com.thinkaurelius.titan.graphdb.vertices

## Class StandardVertex

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.internal.AbstractElement
  - - com.thinkaurelius.titan.graphdb.vertices.AbstractVertex
    - - com.thinkaurelius.titan.graphdb.vertices.StandardVertex

- All Implemented Interfaces:
    Idfiable, TitanElement, TitanVertex, InternalElement, InternalVertex, Removable, com.tinkerpop.blueprints.Element, com.tinkerpop.blueprints.Vertex, Comparable<TitanElement>
  Direct Known Subclasses:
    CacheVertex

      public class StandardVertex
      extends AbstractVertex

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `StandardVertex(StandardTitanTx tx, long id, byte lifecycle)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addRelation(InternalRelation r)` Add a new relation to the vertex
    `List<InternalRelation>` | `getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)` Returns an iterable over all newly added relations incident on this vertex that match the given predicate
    `byte` | `getLifeCycle()`
    `boolean` | `hasAddedRelations()` Whether this vertex has added relations
    `boolean` | `hasLoadedRelations(SliceQuery query)` Returns true if the results for the given query have already been loaded for this vertex and are locally cached.
    `boolean` | `hasRemovedRelations()` Whether this vertex has removed relations
    `EntryList` | `loadRelations(SliceQuery query, Retriever<SliceQuery,EntryList> lookup)` Returns all relations that match the given query.
    `void` | `remove()` Deletes this entity and any incident edges or properties from the graph.
    `void` | `removeRelation(InternalRelation r)` Deleted relation e from the adjacency list of this vertex and updates the state of the vertex to reflect the modification.
    `void` | `updateLifeCycle(ElementLifeCycle.Event event)`

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.vertices.AbstractVertex

      `addEdge, addEdge, addEdge, addProperty, addProperty, getCompareId, getEdgeCount, getEdges, getEdges, getId, getLabel, getProperties, getProperties, getProperties, getProperty, getProperty, getPropertyCount, getPropertyKeys, getRelations, getTitanEdges, getVertexLabel, getVertexLabelInternal, getVertices, isConnected, isModified, it, query, removeProperty, removeProperty, setProperty, setProperty, toString, tx`

    - ### Methods inherited from class com.thinkaurelius.titan.graphdb.internal.AbstractElement

      `clone, compare, compareTo, equals, getLongId, hashCode, hasId, isHidden, isLoaded, isNew, isRemoved, isTemporaryId, setId`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.thinkaurelius.titan.graphdb.internal.InternalElement

      `isHidden, setId`

    - ### Methods inherited from interface com.thinkaurelius.titan.core.TitanElement

      `getLongId, hasId, isLoaded, isNew, isRemoved`

- - ### Constructor Detail

    - #### StandardVertex

          public StandardVertex(StandardTitanTx tx,
                        long id,
                        byte lifecycle)

  - ### Method Detail

    - #### updateLifeCycle

          public final void updateLifeCycle(ElementLifeCycle.Event event)

    - #### removeRelation

          public void removeRelation(InternalRelation r)

      Description copied from interface: `InternalVertex`
      Deleted relation e from the adjacency list of this vertex and updates the state of the vertex to reflect the modification. Note that this method tolerates the prior removal of the vertex and hence does not throw an exception if the relation could not actually be removed from the adjacency list. This behavior was chosen to allow relation deletion while iterating over the list of adjacent relations, in which case the relation deletion is taken care of by the iterator and only vertex status update needs to be executed.
      Parameters:
        `r` - TitanRelation to be removed

    - #### addRelation

          public boolean addRelation(InternalRelation r)

      Description copied from interface: `InternalVertex`
      Add a new relation to the vertex
      Returns:

    - #### getAddedRelations

          public List<InternalRelation> getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)

      Description copied from interface: `InternalVertex`
      Returns an iterable over all newly added relations incident on this vertex that match the given predicate
      Returns:

    - #### loadRelations

          public EntryList loadRelations(SliceQuery query,
                                Retriever<SliceQuery,EntryList> lookup)

      Description copied from interface: `InternalVertex`
      Returns all relations that match the given query. If these matching relations are not currently held in memory, it uses the given `Retriever` to retrieve the edges from backend storage.
      Returns:

    - #### hasLoadedRelations

          public boolean hasLoadedRelations(SliceQuery query)

      Description copied from interface: `InternalVertex`
      Returns true if the results for the given query have already been loaded for this vertex and are locally cached.
      Returns:

    - #### hasRemovedRelations

          public boolean hasRemovedRelations()

      Description copied from interface: `InternalVertex`
      Whether this vertex has removed relations
      Returns:

    - #### hasAddedRelations

          public boolean hasAddedRelations()

      Description copied from interface: `InternalVertex`
      Whether this vertex has added relations
      Returns:

    - #### remove

          public void remove()

      Description copied from interface: `TitanElement`
      Deletes this entity and any incident edges or properties from the graph.

      Specified by:
        `remove` in interface `TitanElement`
      Specified by:
        `remove` in interface `Removable`
      Specified by:
        `remove` in interface `com.tinkerpop.blueprints.Element`
      Overrides:
        `remove` in class `AbstractVertex`

    - #### getLifeCycle

          public byte getLifeCycle()

      Returns:
        The lifecycle of this element
      See Also:
        `ElementLifeCycle`

Copyright © 2012–2014. All rights reserved.