public class ORecordId extends Object implements ORID
Modifier and Type | Field and Description |
---|---|
static ORecordId |
EMPTY_RECORD_ID |
static byte[] |
EMPTY_RECORD_ID_STREAM |
static int |
PERSISTENT_SIZE |
CLUSTER_ID_INVALID, CLUSTER_MAX, CLUSTER_POS_INVALID, PREFIX, SEPARATOR
Constructor and Description |
---|
ORecordId() |
ORecordId(int iClusterIdId) |
ORecordId(int clusterId,
long position) |
ORecordId(ORID parentRid)
Copy constructor.
|
ORecordId(String iRecordId) |
Modifier and Type | Method and Description |
---|---|
int |
compare(OIdentifiable iObj1,
OIdentifiable iObj2) |
int |
compareTo(OIdentifiable iOther) |
ORecordId |
copy() |
void |
copyFrom(ORID iSource) |
static ORecordId |
deserialize(DataInput input) |
boolean |
equals(Object obj) |
ORecordId |
fromStream(byte[] iBuffer)
Unmarshalls the object.
|
void |
fromStream(DataInput in) |
ORecordId |
fromStream(InputStream iStream) |
ORecordId |
fromStream(OMemoryStream iStream) |
void |
fromString(String iRecordId) |
static String |
generateString(int iClusterId,
long iPosition) |
int |
getClusterId() |
long |
getClusterPosition() |
ORID |
getIdentity()
Returns the record identity.
|
<T extends ORecord> |
getRecord()
Returns the record instance.
|
int |
hashCode() |
static boolean |
isA(String iString) |
boolean |
isLocked() |
boolean |
isNew() |
static boolean |
isNew(long pos) |
boolean |
isPersistent() |
static boolean |
isPersistent(long pos) |
boolean |
isTemporary() |
static boolean |
isTemporary(long clusterPosition) |
boolean |
isValid() |
static boolean |
isValid(long pos) |
void |
lock(boolean iExclusive) |
OStorage.LOCKING_STRATEGY |
lockingStrategy() |
String |
next() |
ORID |
nextRid()
Deprecated since v2.2
|
void |
reset() |
static void |
serialize(ORID id,
DataOutput output) |
void |
setClusterId(int clusterId) |
void |
setClusterPosition(long clusterPosition) |
byte[] |
toStream()
Marshalls the object.
|
void |
toStream(DataOutput out) |
int |
toStream(OMemoryStream iStream) |
int |
toStream(OutputStream iStream) |
String |
toString() |
StringBuilder |
toString(StringBuilder iBuffer) |
void |
unlock() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final ORecordId EMPTY_RECORD_ID
public static final byte[] EMPTY_RECORD_ID_STREAM
public static final int PERSISTENT_SIZE
public ORecordId()
public ORecordId(int clusterId, long position)
public ORecordId(int iClusterIdId)
public ORecordId(String iRecordId)
public ORecordId(ORID parentRid)
parentRid
- Source objectpublic static String generateString(int iClusterId, long iPosition)
public static boolean isValid(long pos)
public static boolean isPersistent(long pos)
public static boolean isNew(long pos)
public static boolean isTemporary(long clusterPosition)
public static boolean isA(String iString)
public boolean isPersistent()
isPersistent
in interface ORID
public boolean isTemporary()
isTemporary
in interface ORID
public StringBuilder toString(StringBuilder iBuffer)
public boolean equals(Object obj)
equals
in interface Comparator<OIdentifiable>
equals
in class Object
public int compareTo(OIdentifiable iOther)
compareTo
in interface Comparable<OIdentifiable>
public int compare(OIdentifiable iObj1, OIdentifiable iObj2)
compare
in interface Comparator<OIdentifiable>
public void toStream(DataOutput out) throws IOException
IOException
public void fromStream(DataInput in) throws IOException
IOException
public ORecordId fromStream(InputStream iStream) throws IOException
IOException
public ORecordId fromStream(OMemoryStream iStream)
public ORecordId fromStream(byte[] iBuffer)
OSerializableStream
fromStream
in interface OSerializableStream
iBuffer
- byte array representation of the objectpublic int toStream(OutputStream iStream) throws IOException
toStream
in interface ORID
IOException
public int toStream(OMemoryStream iStream) throws IOException
IOException
public byte[] toStream()
OSerializableStream
toStream
in interface OSerializableStream
OSerializableStream.fromStream(byte[])
public int getClusterId()
getClusterId
in interface ORID
public long getClusterPosition()
getClusterPosition
in interface ORID
public void fromString(String iRecordId)
public void copyFrom(ORID iSource)
public void lock(boolean iExclusive)
lock
in interface OIdentifiable
public boolean isLocked()
isLocked
in interface OIdentifiable
public OStorage.LOCKING_STRATEGY lockingStrategy()
lockingStrategy
in interface OIdentifiable
public void unlock()
unlock
in interface OIdentifiable
public ORID getIdentity()
OIdentifiable
getIdentity
in interface OIdentifiable
public <T extends ORecord> T getRecord()
OIdentifiable
getRecord
in interface OIdentifiable
public void setClusterId(int clusterId)
public void setClusterPosition(long clusterPosition)
public static void serialize(ORID id, DataOutput output) throws IOException
IOException
public static ORecordId deserialize(DataInput input) throws IOException
IOException
Copyright © 2009–2020 OrientDB. All rights reserved.