|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.identity.OIDImpl
public class OIDImpl
An object identifier. OIDs are normally used as object identifiers for persistent objects that use datastore identity. They're also used for view objects, which actually use non-datastore identity. The behaviour of this class is governed by JDO spec 5.4.3. Utilises a String form of the style "3258[OID]mydomain.MyClass".
| Field Summary | |
|---|---|
int |
hashCode
pre-created hasCode to improve performance |
protected static Localiser |
LOCALISER
Localiser for messages. |
java.lang.Object |
oid
The key value. |
java.lang.String |
pcClass
The PersistenceCapable class name |
java.lang.String |
toString
pre-created toString to improve performance |
| Constructor Summary | |
|---|---|
OIDImpl()
Creates an OID with no value. |
|
OIDImpl(java.lang.String str)
Constructs an OID from its string representation that is consistent with the output of toString(). |
|
OIDImpl(java.lang.String pcClass,
java.lang.Object object)
Create a string datastore identity. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object o)
Comparator method. |
boolean |
equals(java.lang.Object obj)
Equality operator. |
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 PC class name and the key value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final transient Localiser LOCALISER
public final java.lang.Object oid
public final java.lang.String pcClass
public final java.lang.String toString
public final int hashCode
| Constructor Detail |
|---|
public OIDImpl()
public OIDImpl(java.lang.String pcClass,
java.lang.Object object)
pcClass - The PersistenceCapable class that this representsobject - The value
public OIDImpl(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 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 compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - The object to compare against
public int hashCode()
hashCode in interface OIDhashCode in class java.lang.Objectpublic java.lang.String toString()
3254[OID]mydomain.MyClass
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 | |||||||||