- java.lang.Object
-
- org.datanucleus.identity.SingleFieldId<Short>
-
- org.datanucleus.identity.ShortId
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Comparable
public class ShortId extends SingleFieldId<Short>
This class is for identity with a single short field.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.datanucleus.identity.SingleFieldId
hashCode, STRING_DELIMITER, targetClassName
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object o)
short
getKey()
Short
getKeyAsObject()
protected boolean
keyEquals(SingleFieldId obj)
void
readExternal(ObjectInput in)
Read this object.String
toString()
Return the String form of the key.void
writeExternal(ObjectOutput out)
Write this object.-
Methods inherited from class org.datanucleus.identity.SingleFieldId
assertKeyNotNull, compare, equals, getTargetClassName, hashCode
-
-
-
-
Method Detail
-
getKey
public short getKey()
-
getKeyAsObject
public Short getKeyAsObject()
- Specified by:
getKeyAsObject
in classSingleFieldId<Short>
-
toString
public String toString()
Return the String form of the key.
-
keyEquals
protected boolean keyEquals(SingleFieldId obj)
- Specified by:
keyEquals
in classSingleFieldId<Short>
-
compareTo
public int compareTo(Object o)
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
Write this object. Write the superclass first.- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classSingleFieldId<Short>
- Parameters:
out
- the output- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
Read this object. Read the superclass first.- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classSingleFieldId<Short>
- Parameters:
in
- the input- Throws:
IOException
ClassNotFoundException
-
-