public class OCompositeKey extends Object implements Comparable<OCompositeKey>, Serializable, ODocumentSerializable
CLASS_NAME
Constructor and Description |
---|
OCompositeKey() |
OCompositeKey(List<?> keys) |
OCompositeKey(Object... keys) |
Modifier and Type | Method and Description |
---|---|
void |
addKey(Object key)
Add new key value to the list of already registered values.
|
int |
compareTo(OCompositeKey otherKey)
Performs partial comparison of two composite keys.
|
boolean |
equals(Object o) |
void |
fromDocument(ODocument document) |
List<Object> |
getKeys() |
int |
hashCode() |
void |
reset()
Clears the keys array for reuse of the object
|
ODocument |
toDocument() |
String |
toString() |
public OCompositeKey(List<?> keys)
public OCompositeKey(Object... keys)
public OCompositeKey()
public void reset()
public void addKey(Object key)
If passed in value is OCompositeKey
itself then its values will be copied in current
index. But key itself will not be added.
key
- Key to add.public int compareTo(OCompositeKey otherKey)
Two objects will be equal if the common subset of their keys is equal. For example if first object contains two keys and second contains four keys then only first two keys will be compared.
compareTo
in interface Comparable<OCompositeKey>
otherKey
- Key to compare.public ODocument toDocument()
toDocument
in interface ODocumentSerializable
public void fromDocument(ODocument document)
fromDocument
in interface ODocumentSerializable
Copyright © 2009–2020 OrientDB. All rights reserved.