CharIdentity
java.lang.Object ∟ javax.jdo.identity.SingleFieldIdentity ∟ javax.jdo.identity.CharIdentity
This class is for identity with a single character field.
- Since:
- JDO 1.0
Public Constructors
- Since:
- JDO 1.0
CharIdentity(Class pcClass, Character key)
- Parameters:
pcClass
- the target classkey
- the key
- Since:
- JDO 1.0
CharIdentity(Class pcClass, String str)
The String must have exactly one character.
- Parameters:
pcClass
- the target classstr
- the key
- Since:
- JDO 1.0
CharIdentity(Class pcClass, char key)
- Parameters:
pcClass
- the target classkey
- the key
- Since:
- JDO 1.0
Public Methods
int compareTo(Object o)
- Parameters:
o
- Other identity
- Return:
- The relative ordering between the objects
- Since:
- JDO 2.2
boolean equals(Object obj)
- Parameters:
obj
- the other object
- Return:
- true if both objects represent the same object id
- Since:
- JDO 1.0
char getKey()
- Return:
- the key
- Since:
- JDO 1.0
Object getKeyAsObject()
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
Class getTargetClass()
String getTargetClassName()
int hashCode()
void readExternal(ObjectInput in)
Read the superclass first.
- Parameters:
in
- the input
- Since:
- JDO 1.0
String toString()
- Return:
- the String form of the key
- Since:
- JDO 1.0
void writeExternal(ObjectOutput out)
Write the superclass first.
- Parameters:
out
- the output
- Since:
- JDO 1.0