Class RID

    • Field Detail

      • bucketId

        protected final int bucketId
      • offset

        protected final long offset
    • Constructor Detail

      • RID

        public RID​(Database database,
                   int bucketId,
                   long offset)
    • Method Detail

      • is

        public static boolean is​(Object value)
      • getBucketId

        public int getBucketId()
      • getPosition

        public long getPosition()
      • getIdentity

        public RID getIdentity()
        Description copied from interface: Identifiable
        Returns the RID (Record ID) for the current object.
        Specified by:
        getIdentity in interface Identifiable
        Returns:
        the RID
      • getRecord

        public Record getRecord​(boolean loadContent)
        Description copied from interface: Identifiable
        Returns the generic record.
        Specified by:
        getRecord in interface Identifiable
        Parameters:
        loadContent - specifies if pre-load the record content
        Returns:
        the Record
      • asDocument

        public Document asDocument()
        Description copied from interface: Identifiable
        Returns the document record. If the record is not a document, a UnsupportedOperationException exception is thrown.
        Specified by:
        asDocument in interface Identifiable
        Returns:
        the Document
      • asDocument

        public Document asDocument​(boolean loadContent)
        Description copied from interface: Identifiable
        Returns the document record. If the record is not a document, a UnsupportedOperationException exception is thrown.
        Specified by:
        asDocument in interface Identifiable
        Parameters:
        loadContent - specifies if pre-load the record content
        Returns:
        the Document
      • asVertex

        public Vertex asVertex()
        Description copied from interface: Identifiable
        Returns the vertex record. If the record is not a vertex, a UnsupportedOperationException exception is thrown.
        Specified by:
        asVertex in interface Identifiable
        Returns:
        the Vertex
      • asVertex

        public Vertex asVertex​(boolean loadContent)
        Description copied from interface: Identifiable
        Returns the vertex record. If the record is not a vertex, a UnsupportedOperationException exception is thrown.
        Specified by:
        asVertex in interface Identifiable
        Parameters:
        loadContent - specifies if pre-load the record content
        Returns:
        the Vertex
      • asEdge

        public Edge asEdge()
        Description copied from interface: Identifiable
        Returns the edge record. If the record is not an edge, a UnsupportedOperationException exception is thrown. *
        Specified by:
        asEdge in interface Identifiable
        Returns:
        the Edge
      • asEdge

        public Edge asEdge​(boolean loadContent)
        Description copied from interface: Identifiable
        Returns the edge record. If the record is not an edge, a UnsupportedOperationException exception is thrown.
        Specified by:
        asEdge in interface Identifiable
        Parameters:
        loadContent - specifies if pre-load the record content
        Returns:
        the Edge
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getDatabase

        public Database getDatabase()
      • isValid

        public boolean isValid()