| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.jdo.identity.SingleFieldIdentity
public abstract class SingleFieldIdentity
This class is the abstract base class for all single field identity classes. A common case of application identity uses exactly one persistent field in the class to represent identity. In this case, the application can use a standard JDO class instead of creating a new user-defined class for the purpose.
| Field Summary | |
|---|---|
| protected  int | hashCodeThe hashCode. | 
| protected  java.lang.Object | keyAsObjectThe key as an Object. | 
| protected static I18NHelper | msgThe Internationalization message helper. | 
| Constructor Summary | |
|---|---|
|   | SingleFieldIdentity()Constructor only for Externalizable. | 
| protected  | SingleFieldIdentity(java.lang.Class pcClass)Constructor with target class. | 
| Method Summary | |
|---|---|
| protected  void | assertKeyNotNull(java.lang.Object key)Assert that the key is not null. | 
| protected  java.lang.Object | createKeyAsObject()Create the key as an Object. | 
|  boolean | equals(java.lang.Object obj)Check the class and class name and object type. | 
|  java.lang.Object | getKeyAsObject()Return the key as an Object. | 
|  java.lang.Class | getTargetClass()Return the target class. | 
|  java.lang.String | getTargetClassName()Return the target class name. | 
| protected  int | hashClassName()Return the hash code of the class name. | 
|  int | hashCode()Return the cached hash code. | 
|  void | readExternal(java.io.ObjectInput in)Read from the input stream. | 
| protected  void | setKeyAsObject(java.lang.Object key)Set the given key as the key for this instance. | 
|  void | writeExternal(java.io.ObjectOutput out)Write to the output stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected static I18NHelper msg
protected int hashCode
protected java.lang.Object keyAsObject
| Constructor Detail | 
|---|
protected SingleFieldIdentity(java.lang.Class pcClass)
pcClass - the class of the targetpublic SingleFieldIdentity()
| Method Detail | 
|---|
protected void setKeyAsObject(java.lang.Object key)
protected void assertKeyNotNull(java.lang.Object key)
public java.lang.Class getTargetClass()
public java.lang.String getTargetClassName()
public java.lang.Object getKeyAsObject()
protected java.lang.Object createKeyAsObject()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the other object
protected int hashClassName()
public int hashCode()
hashCode in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
writeExternal in interface java.io.Externalizableout - the stream
java.io.IOException
public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOException
java.lang.ClassNotFoundException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||