Class OVertexDocument

All Implemented Interfaces:
ODetachable, OIdentifiable, ORecordElement, OElement, ORecord, ORecordSchemaAware, OVertex, OSerializableStream, Externalizable, Serializable, Comparable<OIdentifiable>, Iterable<Map.Entry<String,Object>>, Comparator<OIdentifiable>

public class OVertexDocument extends ODocument implements OVertex
See Also:
  • Constructor Details

    • OVertexDocument

      public OVertexDocument(OClass cl)
    • OVertexDocument

      public OVertexDocument()
    • OVertexDocument

      public OVertexDocument(ODatabaseSession session)
    • OVertexDocument

      public OVertexDocument(ODatabaseSession session, String klass)
    • OVertexDocument

      public OVertexDocument(String klass)
  • Method Details

    • getEdges

      public Iterable<OEdge> getEdges(ODirection direction)
      Specified by:
      getEdges in interface OVertex
    • getEdges

      public Iterable<OEdge> getEdges(ODirection direction, String... labels)
      Specified by:
      getEdges in interface OVertex
    • getEdges

      public Iterable<OEdge> getEdges(ODirection direction, OClass... type)
      Specified by:
      getEdges in interface OVertex
    • getVertices

      public Iterable<OVertex> getVertices(ODirection direction)
      Specified by:
      getVertices in interface OVertex
    • getVertices

      public Iterable<OVertex> getVertices(ODirection direction, String... type)
      Specified by:
      getVertices in interface OVertex
    • getVertices

      public Iterable<OVertex> getVertices(ODirection direction, OClass... type)
      Specified by:
      getVertices in interface OVertex
    • addEdge

      public OEdge addEdge(OVertex to)
      Specified by:
      addEdge in interface OVertex
    • addEdge

      public OEdge addEdge(OVertex to, String type)
      Specified by:
      addEdge in interface OVertex
    • addEdge

      public OEdge addEdge(OVertex to, OClass type)
      Specified by:
      addEdge in interface OVertex
    • moveTo

      public ORID moveTo(String iClassName, String iClusterName)
      Specified by:
      moveTo in interface OVertex
    • moveTo

      protected static ORID moveTo(String iClassName, String iClusterName, OVertex toMove, ODatabaseSession db)
    • delete

      public OVertexDocument delete()
      Description copied from interface: ORecord
      Deletes the record from the database. Behavior depends by the current running transaction if any. If no transaction is running then the record is deleted immediately. If an Optimistic transaction is running then the record will be deleted at commit time. The current transaction will continue to see the record as deleted, while others not. If a Pessimistic transaction is running, then an exclusive lock is acquired against the record. Current transaction will continue to see the record as deleted, while others cannot access to it since it's locked.
      Specified by:
      delete in interface ORecord
      Overrides:
      delete in class ORecordAbstract
      Returns:
      The Object instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • deleteLinks

      public static void deleteLinks(OVertex delegate)
    • getConnectionFieldName

      public static String getConnectionFieldName(ODirection iDirection, String iClassName, boolean useVertexFieldsForEdgeLabels)
    • getEdgeFieldNames

      protected Set<String> getEdgeFieldNames(ODirection iDirection, String... iClassNames)
    • checkDeletedInTx

      protected static boolean checkDeletedInTx(ORID id)
    • replaceLinks

      public static void replaceLinks(ODocument iVertex, String iFieldName, OIdentifiable iVertexToRemove, OIdentifiable iNewVertex)
    • getConnection

      protected OPair<ODirection,String> getConnection(ODirection iDirection, String iFieldName, String... iClassNames)
    • copy

      public OVertexDocument copy()
      Description copied from class: ODocument
      Copies the current instance to a new one. Hasn't been choose the clone() to let ODocument return type. Once copied the new instance has the same identity and values but all the internal structure are totally independent by the source.
      Specified by:
      copy in interface ORecord
      Overrides:
      copy in class ODocument
      Returns:
      The Object instance itself giving a "fluent interface". Useful to call multiple methods in chain.
    • detachEdge

      protected static void detachEdge(OVertex vertex, OEdge edge, String fieldPrefix)
    • detachIncomingEdge

      protected static void detachIncomingEdge(OVertex vertex, OEdge edge)
    • detachOutgointEdge

      protected static void detachOutgointEdge(OVertex vertex, OEdge edge)
    • createLink

      public static Object createLink(ODocument iFromVertex, OIdentifiable iTo, String iFieldName)
      (Internal only) Creates a link between a vertices and a Graph Element.