javax.jdo.identity.CharIdentity - JDO class
javax.jdo.identity
Class CharIdentity
java.lang.Object javax.jdo.identity.SingleFieldIdentity javax.jdo.identity.CharIdentity
- Implemented Interfaces:
-
Externalizable
,Serializable
,Comparable
This class is for identity with a single character field.
- Since:
- JDO 1.0
Constructor only for Externalizable.
- Since:
- JDO 1.0
CharIdentity(Class pcClass, char key)
Constructor with class and key.
- Parameters:
-
pcClass
- the target classkey
- the key
- Since:
- JDO 1.0
CharIdentity(Class pcClass, String str)
Constructor with class and key. The String must have exactly one character.
- Parameters:
-
pcClass
- the target classstr
- the key
- Since:
- JDO 1.0
CharIdentity(Class pcClass, Character key)
Constructor with class and key.
- Parameters:
-
pcClass
- the target classkey
- the key
- Since:
- JDO 1.0
int compareTo(T arg0)
- Parameters:
-
arg0
-
int compareTo(Object o)
Determine the ordering of identity objects.
- Parameters:
-
o
- Other identity
- Returns:
- 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
- Returns:
- true if both objects represent the same object id
- Since:
- JDO 1.0
boolean equals(Object obj)
Check the class and class name and object type. If restored from serialization, class will be null so compare class name.
- Parameters:
-
obj
- the other object
- Returns:
- true if the class or class name is the same
- Since:
- JDO 1.0
char getKey()
Return the key.
- Returns:
- the key
- Since:
- JDO 1.0
Object getKeyAsObject()
Return the key as an Object. The method is synchronized to avoid race conditions in multi-threaded environments.
- Returns:
- the key as an Object.
- Since:
- JDO 2.0
Class getTargetClass()
Return the target class.
- Returns:
- the target class.
- Since:
- JDO 2.0
String getTargetClassName()
Return the target class name.
- Returns:
- the target class name.
- Since:
- JDO 2.0
int hashCode()
Return the cached hash code.
- Returns:
- the cached hash code.
- Since:
- JDO 1.0
void readExternal(ObjectInput in)throws IOException, ClassNotFoundException
Read this object. Read the superclass first.
- Parameters:
-
in
- the input
- Since:
- JDO 1.0
String toString()
Return the String form of the key.
- Returns:
- 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
void readExternal(ObjectInput arg0)throws IOException, ClassNotFoundException
- Parameters:
-
arg0
-
void writeExternal(ObjectOutput arg0)
- Parameters:
-
arg0
-