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.Object
obj
- the other objectprotected 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.Externalizable
out
- the streamjava.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
protected int compare(SingleFieldIdentity o)
o
- Other identity