@Immutable public class OrientInstanceReference extends Object implements InstanceReference
LocalOrientDB
.Constructor and Description |
---|
OrientInstanceReference(com.orientechnologies.orient.core.id.ORID id,
DataSet dataSet,
TypeDefinition typeDefinition)
Create a reference to an instance
|
Modifier and Type | Method and Description |
---|---|
static InstanceReference |
createReference(Instance instance)
Create a reference for an instance
|
boolean |
equals(Object obj) |
DataSet |
getDataSet()
Get the data set the instance is associated to.
|
com.orientechnologies.orient.core.id.ORID |
getId() |
TypeDefinition |
getTypeDefinition() |
int |
hashCode() |
Instance |
load(LocalOrientDB lodb)
Load the instance specified by the reference from the given database.
|
public OrientInstanceReference(com.orientechnologies.orient.core.id.ORID id, DataSet dataSet, TypeDefinition typeDefinition)
id
- the record IDdataSet
- the data settypeDefinition
- the associated type definitionpublic com.orientechnologies.orient.core.id.ORID getId()
public DataSet getDataSet()
InstanceReference
getDataSet
in interface InstanceReference
null
if not setpublic TypeDefinition getTypeDefinition()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public static InstanceReference createReference(Instance instance)
instance
- the instance, which must be an OInstance
IllegalArgumentException
- if the instance is no OInstance
public Instance load(LocalOrientDB lodb)
lodb
- the databasenull
if no instance matching the
reference is presentBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a