public class DatastoreUniqueOID extends Object implements Serializable, OID, Comparable
Modifier and Type | Field and Description |
---|---|
long |
key
The key value.
|
Constructor and Description |
---|
DatastoreUniqueOID()
Creates an OID with no value.
|
DatastoreUniqueOID(long key)
Constructor taking the long form of the key.
|
DatastoreUniqueOID(String str)
Constructs an OID from its string representation that is consistent with the output of toString().
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o)
Comparator method.
|
boolean |
equals(Object obj)
Equality operator.
|
long |
getKey()
Convenience accessor for the long form of the key.
|
Object |
getKeyValue()
Accessor for the key value.
|
String |
getPcClass()
Accessor for the persistable class name.
|
int |
hashCode()
Accessor for the hashcode
|
String |
toString()
Creates a String representation of the datastore identity, formed from the key value.
|
public DatastoreUniqueOID()
public DatastoreUniqueOID(long key)
key
- The keypublic DatastoreUniqueOID(String str) throws IllegalArgumentException
str
- the string representation of an OIDIllegalArgumentException
- if the given string representation is not valid.toString()
public Object getKeyValue()
getKeyValue
in interface OID
public long getKey()
public String getPcClass()
getPcClass
in interface OID
public boolean equals(Object obj)
public int compareTo(Object o)
compareTo
in interface Comparable
o
- The object to compare againstpublic int hashCode()
Copyright © 2019. All rights reserved.