public abstract class SingleFieldId<T> extends Object implements Externalizable, Comparable
Modifier and Type | Field and Description |
---|---|
protected int |
hashCode |
protected static String |
STRING_DELIMITER |
protected String |
targetClassName
The name of the class of the target persistable object.
|
Modifier | Constructor and Description |
---|---|
|
SingleFieldId() |
protected |
SingleFieldId(Class pcClass) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertKeyNotNull(Object key)
Assert that the key is not null.
|
protected int |
compare(SingleFieldId o)
Determine the ordering of identity objects.
|
boolean |
equals(Object obj)
Check the class and class name and object type.
|
abstract T |
getKeyAsObject() |
String |
getTargetClassName() |
int |
hashCode() |
protected abstract boolean |
keyEquals(SingleFieldId other) |
void |
readExternal(ObjectInput in)
Read from the input stream.
|
void |
writeExternal(ObjectOutput out)
Write to the output stream.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compareTo
protected static final String STRING_DELIMITER
protected String targetClassName
protected int hashCode
protected SingleFieldId(Class pcClass)
public SingleFieldId()
protected void assertKeyNotNull(Object key)
key
- The keypublic String getTargetClassName()
public abstract T getKeyAsObject()
public boolean equals(Object obj)
protected abstract boolean keyEquals(SingleFieldId other)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
out
- the streamIOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
in
- Input objectIOException
ClassNotFoundException
protected int compare(SingleFieldId o)
o
- Other identityCopyright © 2019. All rights reserved.