Package de.xima.fc.workflow
Class ObjectReference
- java.lang.Object
-
- de.xima.fc.workflow.ObjectReference
-
- All Implemented Interfaces:
IObjectReference,Serializable
public final class ObjectReference extends Object implements IObjectReference
A reference to an object (a concrete instance of a certain type of objects), consisting of the type of the objects and the unique identifier of the object within that type.- Since:
- 8.5.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ObjectReferencecopyOf(IObjectReference value)Creates a copy of the given object reference with the same type and id.booleanequals(Object o)StringgetId()Gets the ID of the identified object.StringgetType()Gets the type of the identified objects.inthashCode()static ObjectReferenceof(String type, String id)Creates a new object reference of the given type and id.static ObjectReferenceofKnown(EntityType type, String id)Creates a new object reference of the given type and id.StringtoString()static ObjectReferencevalueOf(String value)Parses an object reference from its string representation, as returned bytoString().-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.workflow.reference.IObjectReference
getId, getTypeKnown
-
-
-
-
Method Detail
-
getId
public String getId()
Description copied from interface:IObjectReferenceGets the ID of the identified object.- Specified by:
getIdin interfaceIObjectReference- Returns:
- The object ID.
-
getType
public String getType()
Description copied from interface:IObjectReferenceGets the type of the identified objects. This should be thetype nameof anEntityType, if available, but may be another string in case no such entity type exists. PreferIObjectReference.getTypeKnown()if applicable.- Specified by:
getTypein interfaceIObjectReference- Returns:
- The object type.
-
copyOf
public static ObjectReference copyOf(IObjectReference value)
Creates a copy of the given object reference with the same type and id.- Parameters:
value- The object reference to copy.- Returns:
- The copied object reference.
-
of
public static ObjectReference of(String type, String id)
Creates a new object reference of the given type and id.- Parameters:
type- The type of the object. Must have atoString()method that returns a unique string representation.id- The identifier for the object of that type. Must have atoString()method that returns a unique string representation.- Returns:
- The object reference.
-
ofKnown
public static ObjectReference ofKnown(EntityType type, String id)
Creates a new object reference of the given type and id.- Parameters:
type- The type of the object. Must have atoString()method that returns a unique string representation.id- The identifier for the object of that type. Must have atoString()method that returns a unique string representation.- Returns:
- The object reference.
-
valueOf
public static ObjectReference valueOf(String value)
Parses an object reference from its string representation, as returned bytoString().- Parameters:
value- The string representation.- Returns:
- The object reference, or null if the string is null or blank.
- Throws:
IllegalArgumentException- If the string is not in the correct format.
-
-