JDO Class

ShortIdentity

java.lang.Object
  ∟ javax.jdo.identity.SingleFieldIdentity
    ∟ javax.jdo.identity.ShortIdentity

This class is for identity with a single short field.
Since:
JDO 1.0

Public Constructors

Constructor only for Externalizable.
Since:
JDO 1.0
ShortIdentity(Class pcClass, Short key)
Constructor with class and key.
Parameters:
pcClass - the class
key - the key
Since:
JDO 1.0
ShortIdentity(Class pcClass, String str)
Constructor with class and key.
Parameters:
pcClass - the class
str - the key
Since:
JDO 1.0
ShortIdentity(Class pcClass, short key)
Constructor with class and key.
Parameters:
pcClass - the class
key - the key
Since:
JDO 1.0

Public Methods

int compareTo(Object o)
Determine the ordering of identity objects.
Parameters:
o - Other identity
Return:
The relative ordering between the objects
Since:
JDO 2.2
boolean equals(Object obj)
Determine if the other object represents the same object id.
Parameters:
obj - the other object
Return:
true if both objects represent the same object id
Since:
JDO 1.0
short getKey()
Return the key.
Return:
the key
Since:
JDO 1.0
Return the key as an Object.
The method is synchronized to avoid race conditions in multi-threaded environments.
Return:
the key as an Object.
Inherited from:
SingleFieldIdentity
Since:
JDO 2.0
Return the target class.
Return:
the target class.
Inherited from:
SingleFieldIdentity
Since:
JDO 2.0
Return the target class name.
Return:
the target class name.
Inherited from:
SingleFieldIdentity
Since:
JDO 2.0
int hashCode()
Return the cached hash code.
Return:
the cached hash code.
Inherited from:
SingleFieldIdentity
Since:
JDO 1.0
void readExternal(ObjectInput in)
Read this object.
Read the superclass first.
Parameters:
in - the input
Since:
JDO 1.0
String toString()
Return the String form of the key.
Return:
the String form of the key
Since:
JDO 1.0
void writeExternal(ObjectOutput out)
Write this object.
Write the superclass first.
Parameters:
out - the output
Since:
JDO 1.0

Method inherited from class javax.jdo.identity.SingleFieldIdentity

equals, getKeyAsObject, getTargetClass, getTargetClassName, hashCode, readExternal, writeExternal

Method inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait