Package org.datanucleus.identity
Class LongId
- java.lang.Object
-
- org.datanucleus.identity.SingleFieldId<java.lang.Long,LongId>
-
- org.datanucleus.identity.LongId
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,java.lang.Comparable<LongId>
public class LongId extends SingleFieldId<java.lang.Long,LongId>
This class is for identity with a single long field.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private longkey-
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 intcompareTo(LongId other)longgetKey()java.lang.LonggetKeyAsObject()Accessor for the keyprotected booleankeyEquals(LongId obj)voidreadExternal(java.io.ObjectInput in)Read this object.java.lang.StringtoString()Return the String form of the key.voidwriteExternal(java.io.ObjectOutput out)Write this object.-
Methods inherited from class org.datanucleus.identity.SingleFieldId
assertKeyNotNull, compare, equals, getTargetClassName, hashCode
-
-
-
-
Method Detail
-
getKey
public long getKey()
-
getKeyAsObject
public java.lang.Long getKeyAsObject()
Description copied from class:SingleFieldIdAccessor for the key- Specified by:
getKeyAsObjectin classSingleFieldId<java.lang.Long,LongId>- Returns:
- The key
-
toString
public java.lang.String toString()
Return the String form of the key.- Overrides:
toStringin classjava.lang.Object- Returns:
- the String form of the key
-
keyEquals
protected boolean keyEquals(LongId obj)
- Specified by:
keyEqualsin classSingleFieldId<java.lang.Long,LongId>
-
compareTo
public int compareTo(LongId other)
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOExceptionWrite this object. Write the superclass first.- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classSingleFieldId<java.lang.Long,LongId>- Parameters:
out- the output- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionRead this object. Read the superclass first.- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classSingleFieldId<java.lang.Long,LongId>- Parameters:
in- the input- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-