
public class OVertexDelegate extends Object implements OVertex
ORecordElement.STATUS| Constructor and Description |
|---|
OVertexDelegate(ODocument entry) |
| Modifier and Type | Method and Description |
|---|---|
OEdge |
addEdge(OVertex to) |
OEdge |
addEdge(OVertex to,
OClass type) |
OEdge |
addEdge(OVertex to,
String type) |
Optional<OEdge> |
asEdge()
Returns an instance of OEdge representing current element
|
Optional<OVertex> |
asVertex()
Returns an instance of OVertex representing current element
|
protected boolean |
checkDeletedInTx() |
<RET extends ORecord> |
clear()
All the fields are deleted but the record identity is maintained.
|
int |
compare(OIdentifiable o1,
OIdentifiable o2) |
int |
compareTo(OIdentifiable o) |
<RET extends ORecord> |
copy()
Creates a copy of the record.
|
static Object |
createLink(ODocument iFromVertex,
OIdentifiable iTo,
String iFieldName)
(Internal only) Creates a link between a vertices and a Graph Element.
|
OVertex |
delete()
Deletes the record from the database.
|
static void |
deleteLinks(OVertex delegate) |
boolean |
detach()
Removes all the dependencies with other records.
|
protected static void |
detachEdge(OVertex vertex,
OEdge edge,
String fieldPrefix) |
protected static void |
detachIncomingEdge(OVertex vertex,
OEdge edge) |
protected static void |
detachOutgointEdge(OVertex vertex,
OEdge edge) |
boolean |
equals(Object obj) |
<RET extends ORecord> |
fromJSON(String iJson)
Fills the record parsing the content in JSON format.
|
OSerializableStream |
fromStream(byte[] iStream)
Unmarshalls the object.
|
protected OPair<ODirection,String> |
getConnection(ODirection iDirection,
String iFieldName,
String... iClassNames) |
static String |
getConnectionFieldName(ODirection iDirection,
String iClassName,
boolean useVertexFieldsForEdgeLabels) |
ODatabaseDocument |
getDatabase()
Returns the database where the record belongs.
|
protected Set<String> |
getEdgeFieldNames(ODirection iDirection,
String... iClassNames) |
Iterable<OEdge> |
getEdges(ODirection direction) |
Iterable<OEdge> |
getEdges(ODirection direction,
OClass... type) |
Iterable<OEdge> |
getEdges(ODirection direction,
String... labels) |
ORID |
getIdentity()
Returns the record identity as <cluster-id>:<cluster-position>
|
ORecordElement.STATUS |
getInternalStatus()
Returns the current status of the record.
|
ORecordElement |
getOwner() |
<RET> RET |
getProperty(String name)
Gets a property given its name
|
Set<String> |
getPropertyNames()
Returns all the names of defined properties
|
<T extends ORecord> |
getRecord()
Returns the record instance.
|
Optional<OClass> |
getSchemaType()
Returns the type of current element, ie the class in the schema (if any)
|
int |
getSize()
Returns the size in bytes of the record.
|
int |
getVersion()
Returns the current version number of the record.
|
Iterable<OVertex> |
getVertices(ODirection direction) |
Iterable<OVertex> |
getVertices(ODirection direction,
OClass... type) |
Iterable<OVertex> |
getVertices(ODirection direction,
String... type) |
int |
hashCode() |
boolean |
isDirty()
Checks if the record is dirty, namely if it was changed in memory.
|
boolean |
isEdge()
return true if the current element is an edge
|
boolean |
isLocked() |
boolean |
isVertex()
return true if the current element is a vertex
|
<RET extends ORecord> |
load()
Loads the record content in memory.
|
void |
lock(boolean iExclusive) |
OStorage.LOCKING_STRATEGY |
lockingStrategy() |
ORID |
moveTo(String iClassName,
String iClusterName) |
<RET extends ORecord> |
reload()
Loads the record content in memory.
|
<RET extends ORecord> |
reload(String fetchPlan,
boolean ignoreCache,
boolean force) |
<RET> RET |
removeProperty(String name)
Remove a property
|
static void |
replaceLinks(ODocument iVertex,
String iFieldName,
OIdentifiable iVertexToRemove,
OIdentifiable iNewVertex) |
<RET extends ORecord> |
reset()
Resets the record to be reused.
|
<RET extends ORecord> |
save()
Saves in-memory changes to the database.
|
<RET extends ORecord> |
save(boolean forceCreate) |
<RET extends ORecord> |
save(String iCluster)
Saves in-memory changes to the database defining a specific cluster where to save it.
|
<RET extends ORecord> |
save(String iCluster,
boolean forceCreate) |
<RET> RET |
setDirty()
Marks the instance as dirty.
|
void |
setDirtyNoChanged() |
void |
setInternalStatus(ORecordElement.STATUS iStatus)
Changes the current internal status.
|
void |
setProperty(String name,
Object value)
Sets a property value
|
void |
setProperty(String name,
Object value,
OType... fieldType)
Sets a property value
|
String |
toJSON()
Exports the record in JSON format.
|
String |
toJSON(String iFormat)
Exports the record in JSON format specifying additional formatting settings.
|
byte[] |
toStream()
Marshalls the object.
|
String |
toString() |
<RET extends ORecord> |
unload()
Unloads current record.
|
void |
unlock() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongprotected final ODocument element
public OVertexDelegate(ODocument entry)
public Iterable<OEdge> getEdges(ODirection direction)
public Iterable<OEdge> getEdges(ODirection direction, String... labels)
public Iterable<OEdge> getEdges(ODirection direction, OClass... type)
public Iterable<OVertex> getVertices(ODirection direction)
getVertices in interface OVertexpublic Iterable<OVertex> getVertices(ODirection direction, String... type)
getVertices in interface OVertexpublic Iterable<OVertex> getVertices(ODirection direction, OClass... type)
getVertices in interface OVertexpublic OVertex delete()
ORecordpublic static void deleteLinks(OVertex delegate)
public Set<String> getPropertyNames()
OElementgetPropertyNames in interface OElementpublic <RET> RET getProperty(String name)
OElementgetProperty in interface OElementname - the property namepublic void setProperty(String name, Object value)
OElementsetProperty in interface OElementname - the property namevalue - the property valuepublic void setProperty(String name, Object value, OType... fieldType)
OElementsetProperty in interface OElementname - the property namevalue - the property valuefieldType - Forced type (not auto-determined)public <RET> RET removeProperty(String name)
OElementremoveProperty in interface OElementname - the property namepublic Optional<OVertex> asVertex()
OElementpublic Optional<OEdge> asEdge()
OElementpublic boolean isVertex()
OElementpublic boolean isEdge()
OElementpublic Optional<OClass> getSchemaType()
OElementgetSchemaType in interface OElementpublic <T extends ORecord> T getRecord()
OIdentifiablegetRecord in interface OIdentifiablepublic void lock(boolean iExclusive)
lock in interface OIdentifiablepublic boolean isLocked()
isLocked in interface OIdentifiablepublic OStorage.LOCKING_STRATEGY lockingStrategy()
lockingStrategy in interface OIdentifiablepublic void unlock()
unlock in interface OIdentifiablepublic int compareTo(OIdentifiable o)
compareTo in interface Comparable<OIdentifiable>public int compare(OIdentifiable o1, OIdentifiable o2)
compare in interface Comparator<OIdentifiable>protected OPair<ODirection,String> getConnection(ODirection iDirection, String iFieldName, String... iClassNames)
protected Set<String> getEdgeFieldNames(ODirection iDirection, String... iClassNames)
public static Object createLink(ODocument iFromVertex, OIdentifiable iTo, String iFieldName)
public boolean equals(Object obj)
equals in interface Comparator<OIdentifiable>equals in class Objectpublic ORecordElement.STATUS getInternalStatus()
ORecordElementgetInternalStatus in interface ORecordElementORecordElement.STATUSpublic void setInternalStatus(ORecordElement.STATUS iStatus)
ORecordElementsetInternalStatus in interface ORecordElementiStatus - status between the values defined in the enum ORecordElement.STATUSpublic <RET> RET setDirty()
ORecordElementsetDirty in interface ORecordElementpublic void setDirtyNoChanged()
setDirtyNoChanged in interface ORecordElementpublic ORecordElement getOwner()
getOwner in interface ORecordElementpublic byte[] toStream()
throws OSerializationException
OSerializableStreamtoStream in interface OSerializableStreamOSerializationException - if the marshalling does not succeedOSerializableStream.fromStream(byte[])public OSerializableStream fromStream(byte[] iStream) throws OSerializationException
OSerializableStreamfromStream in interface OSerializableStreamiStream - byte array representation of the objectOSerializationException - if the unmarshalling does not succeedpublic boolean detach()
ORecordpublic <RET extends ORecord> RET reset()
ORecordpublic <RET extends ORecord> RET unload()
ORecordpublic <RET extends ORecord> RET clear()
ORecordpublic <RET extends ORecord> RET copy()
ORecordpublic ORID getIdentity()
ORecordgetIdentity in interface OIdentifiablegetIdentity in interface ORecordpublic int getVersion()
ORecordgetVersion in interface ORecordOTransactionOptimisticpublic ODatabaseDocument getDatabase()
ORecordgetDatabase in interface ORecordpublic boolean isDirty()
ORecordpublic <RET extends ORecord> RET load() throws ORecordNotFoundException
ORecordload in interface ORecordORecordNotFoundExceptionpublic <RET extends ORecord> RET reload() throws ORecordNotFoundException
ORecordreload in interface ORecordORecordNotFoundExceptionpublic <RET extends ORecord> RET reload(String fetchPlan, boolean ignoreCache, boolean force) throws ORecordNotFoundException
reload in interface ORecordORecordNotFoundExceptionpublic <RET extends ORecord> RET save()
ORecordpublic <RET extends ORecord> RET save(String iCluster)
ORecordpublic <RET extends ORecord> RET save(boolean forceCreate)
public <RET extends ORecord> RET fromJSON(String iJson)
ORecordpublic String toJSON()
ORecordpublic String toJSON(String iFormat)
ORecordtoJSON in interface ORecordiFormat - Format settings separated by comma. Available settings are:
public int getSize()
ORecordprotected boolean checkDeletedInTx()
public static String getConnectionFieldName(ODirection iDirection, String iClassName, boolean useVertexFieldsForEdgeLabels)
public static void replaceLinks(ODocument iVertex, String iFieldName, OIdentifiable iVertexToRemove, OIdentifiable iNewVertex)
Copyright © 2009–2025 OrientDB. All rights reserved.