Package com.arcadedb.database
Class BaseRecord
- java.lang.Object
-
- com.arcadedb.database.BaseRecord
-
- All Implemented Interfaces:
Identifiable
,Record
- Direct Known Subclasses:
BaseDocument
,MutableEdgeSegment
public abstract class BaseRecord extends Object implements Record
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BaseRecord(Database database, RID rid, Binary buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Document
asDocument()
Returns the document record.Document
asDocument(boolean loadContent)
Returns the document record.Edge
asEdge()
Returns the edge record.Edge
asEdge(boolean loadContent)
Returns the edge record.Vertex
asVertex()
Returns the vertex record.Vertex
asVertex(boolean loadContent)
Returns the vertex record.void
delete()
boolean
equals(Object o)
Binary
getBuffer()
Database
getDatabase()
RID
getIdentity()
Returns the RID (Record ID) for the current object.Record
getRecord()
Returns the generic record by pre-loading also its content.Record
getRecord(boolean loadContent)
Returns the generic record.int
hashCode()
void
reload()
void
setBuffer(Binary buffer)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.arcadedb.database.Record
getRecordType, toJSON, toJSON
-
-
-
-
Field Detail
-
database
protected final DatabaseInternal database
-
rid
protected RID rid
-
buffer
protected Binary buffer
-
-
Method Detail
-
getIdentity
public RID getIdentity()
Description copied from interface:Identifiable
Returns the RID (Record ID) for the current object.- Specified by:
getIdentity
in interfaceIdentifiable
- Specified by:
getIdentity
in interfaceRecord
- Returns:
- the
RID
-
getRecord
public Record getRecord()
Description copied from interface:Identifiable
Returns the generic record by pre-loading also its content.- Specified by:
getRecord
in interfaceIdentifiable
- Returns:
- the
Record
-
getRecord
public Record getRecord(boolean loadContent)
Description copied from interface:Identifiable
Returns the generic record.- Specified by:
getRecord
in interfaceIdentifiable
- Parameters:
loadContent
- specifies if pre-load the record content- Returns:
- the
Record
-
getDatabase
public Database getDatabase()
- Specified by:
getDatabase
in interfaceRecord
-
getBuffer
public Binary getBuffer()
-
setBuffer
public void setBuffer(Binary buffer)
-
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 interfaceIdentifiable
- 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 interfaceIdentifiable
- 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 interfaceIdentifiable
- 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 interfaceIdentifiable
- 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 interfaceIdentifiable
- 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 interfaceIdentifiable
- Parameters:
loadContent
- specifies if pre-load the record content- Returns:
- the
Edge
-
-