public abstract class SingleFieldIdentity
extends java.lang.Object
implements java.io.Externalizable, java.lang.Comparable
| Modifier and Type | Field and Description |
|---|---|
protected int |
hashCode
The hashCode.
|
protected java.lang.Object |
keyAsObject
The key as an Object.
|
protected static I18NHelper |
msg
The Internationalization message helper.
|
private java.lang.Class |
targetClass
The class of the target object.
|
private java.lang.String |
targetClassName
The name of the class of the target object.
|
| Modifier | Constructor and Description |
|---|---|
|
SingleFieldIdentity()
Constructor only for Externalizable.
|
protected |
SingleFieldIdentity(java.lang.Class pcClass)
Constructor with target class.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertKeyNotNull(java.lang.Object key)
Assert that the key is not null.
|
protected int |
compare(SingleFieldIdentity o)
Determine the ordering of identity objects.
|
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.
|
protected static I18NHelper msg
private transient java.lang.Class targetClass
private java.lang.String targetClassName
protected int hashCode
protected java.lang.Object keyAsObject
protected SingleFieldIdentity(java.lang.Class pcClass)
pcClass - the class of the targetpublic SingleFieldIdentity()
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 objectprotected int hashClassName()
public int hashCode()
hashCode in class java.lang.Objectpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - the streamjava.io.IOExceptionpublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.Externalizablejava.io.IOExceptionjava.lang.ClassNotFoundExceptionprotected int compare(SingleFieldIdentity o)
o - Other identity