
public class OEdgeDelegate extends Object implements OEdge
ORecordElement.STATUS| Modifier and Type | Field and Description |
|---|---|
protected ODocument |
element |
protected OClass |
lightweightEdgeType |
protected String |
lightwightEdgeLabel |
protected OVertex |
vIn |
protected OVertex |
vOut |
DIRECITON_IN, DIRECITON_OUT, DIRECTION_IN, DIRECTION_OUT| Constructor and Description |
|---|
OEdgeDelegate(ODocument elem) |
OEdgeDelegate(OVertex out,
OVertex in,
OClass lightweightEdgeType,
String edgeLabel) |
| Modifier and Type | Method and Description |
|---|---|
Optional<OEdge> |
asEdge()
Returns an instance of OEdge representing current element
|
Optional<OVertex> |
asVertex()
Returns an instance of OVertex representing current element
|
OEdge |
clear()
All the fields are deleted but the record identity is maintained.
|
int |
compare(OIdentifiable o1,
OIdentifiable o2) |
int |
compareTo(OIdentifiable o) |
OEdge |
copy()
Creates a copy of the record.
|
OEdge |
delete()
Deletes the record from the database.
|
static void |
deleteLinks(OEdge delegate) |
boolean |
detach()
Removes all the dependencies with other records.
|
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.
|
ODatabaseDocument |
getDatabase()
Returns the database where the record belongs.
|
OVertex |
getFrom() |
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.
|
OVertex |
getTo() |
int |
getVersion()
Returns the current version number of the record.
|
int |
hashCode() |
boolean |
hasProperty(String propertyName)
Check if a property exists in the Element
|
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 |
isLabeled(String[] labels) |
boolean |
isLightweight() |
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() |
<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
|
<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() |
OEdge |
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 OVertex vOut
protected OVertex vIn
protected OClass lightweightEdgeType
protected String lightwightEdgeLabel
protected ODocument element
public OEdgeDelegate(OVertex out, OVertex in, OClass lightweightEdgeType, String edgeLabel)
public OEdgeDelegate(ODocument elem)
public boolean isLightweight()
isLightweight in interface OEdgepublic Set<String> getPropertyNames()
OElementgetPropertyNames in interface OElementpublic OEdge delete()
ORecordpublic static void deleteLinks(OEdge delegate)
public <RET> RET getProperty(String name)
OElementgetProperty in interface OElementname - the property namepublic boolean hasProperty(String propertyName)
OElementhasProperty in interface OElementpublic 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 ORID getIdentity()
ORecordgetIdentity in interface OIdentifiablegetIdentity in interface ORecordpublic <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 compare(OIdentifiable o1, OIdentifiable o2)
compare in interface Comparator<OIdentifiable>public int compareTo(OIdentifiable o)
compareTo in interface Comparable<OIdentifiable>public boolean equals(Object obj)
equals in interface Comparator<OIdentifiable>equals in class Objectpublic ORecordElement.STATUS getInternalStatus()
ORecordgetInternalStatus in interface ORecordSTATUSpublic void setInternalStatus(ORecordElement.STATUS iStatus)
ORecordsetInternalStatus in interface ORecordiStatus - status between the values defined in the enum 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 OEdge unload()
ORecordpublic OEdge clear()
ORecordpublic OEdge copy()
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()
ORecordCopyright © 2009–2025 OrientDB. All rights reserved.