|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.identity.DatastoreUniqueOID
public class DatastoreUniqueOID
Identity for use with datastore-identity where the datastore provides a unique "identity" key per object and hence doesn't need the class name. The behaviour of this class is governed by JDO spec 5.4.3. Main benefit over OIDImpl is size.
| Field Summary | |
|---|---|
long |
key
The key value. |
| Constructor Summary | |
|---|---|
DatastoreUniqueOID()
Creates an OID with no value. |
|
DatastoreUniqueOID(long key)
Constructor taking the long form of the key. |
|
DatastoreUniqueOID(java.lang.String str)
Constructs an OID from its string representation that is consistent with the output of toString(). |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Equality operator. |
long |
getKey()
Convenience accessor for the long form of the key. |
java.lang.Object |
getKeyValue()
Accessor for the key value. |
java.lang.String |
getPcClass()
Accessor for the PersistenceCapable class name. |
int |
hashCode()
Accessor for the hashcode |
java.lang.String |
toString()
Creates a String representation of the datastore identity, formed from the key value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final long key
| Constructor Detail |
|---|
public DatastoreUniqueOID()
public DatastoreUniqueOID(long key)
key - The key
public DatastoreUniqueOID(java.lang.String str)
throws java.lang.IllegalArgumentException
str - the string representation of an OID
java.lang.IllegalArgumentException - if the given string representation is not valid.toString()| Method Detail |
|---|
public java.lang.Object getKeyValue()
getKeyValue in interface OIDpublic long getKey()
public java.lang.String getPcClass()
getPcClass in interface OIDpublic boolean equals(java.lang.Object obj)
equals in interface OIDequals in class java.lang.Objectobj - Object to compare against
public int hashCode()
hashCode in interface OIDhashCode in class java.lang.Objectpublic java.lang.String toString()
3254
toString in interface OIDtoString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||