public class ObjectId extends SingleFieldId
| Modifier and Type | Class and Description |
|---|---|
static interface |
ObjectId.StringConstructor
Construct an instance of a key class using a String as input.
|
hashCode, STRING_DELIMITER, targetClassName| Constructor and Description |
|---|
ObjectId() |
ObjectId(Class pcClass,
Object param)
Constructor with class and key.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o) |
static Object |
construct(String className,
String keyString)
Construct an instance of the parameter class, using the keyString as an argument to the constructor.
|
Object |
getKey() |
Object |
getKeyAsObject() |
protected boolean |
keyEquals(SingleFieldId obj) |
void |
readExternal(ObjectInput in)
Read this object.
|
static Object |
registerStringConstructor(Class cls,
ObjectId.StringConstructor sc)
Register special StringConstructor instances.
|
String |
toString()
Return the String form of the object id.
|
void |
writeExternal(ObjectOutput out)
Write this object.
|
assertKeyNotNull, compare, equals, getTargetClassName, hashCodepublic ObjectId(Class pcClass, Object param)
pcClass - the classparam - the keypublic ObjectId()
public Object getKey()
public Object getKeyAsObject()
getKeyAsObject in class SingleFieldIdpublic String toString()
protected boolean keyEquals(SingleFieldId obj)
keyEquals in class SingleFieldIdpublic int compareTo(Object o)
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class SingleFieldIdout - the outputIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class SingleFieldIdin - the inputIOExceptionClassNotFoundExceptionpublic static Object registerStringConstructor(Class cls, ObjectId.StringConstructor sc)
cls - the class to register a StringConstructor forsc - the StringConstructor instancepublic static Object construct(String className, String keyString)
className - the name of the classkeyString - the String parameter for the constructorCopyright © 2019. All rights reserved.