Package de.xima.fc.workflow
Class EntityRef
- java.lang.Object
-
- de.xima.fc.workflow.EntityRef
-
- All Implemented Interfaces:
Serializable
public final class EntityRef extends Object implements Serializable
Model class for referencing an entity either byUUID
or name- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityRef()
For JSON serialization / deserialization only.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
static EntityRef
forNameValue(String nameRef)
static EntityRef
forUuidEntity(IUUIDEntity entity)
static EntityRef
forUuidEntityRef(UuidEntityRef uuidEntityRef)
String
getNameRef()
EEntityRefType
getRefType()
UuidEntityRef
getUuidRef()
int
hashCode()
void
setNameRef(String nameRef)
void
setRefType(EEntityRefType refType)
void
setUuidRef(UuidEntityRef uuidRef)
-
-
-
Method Detail
-
getNameRef
public String getNameRef()
- Returns:
- Name of the entity, when
getRefType()
isEEntityRefType.NAME_VALUE
.
-
getRefType
public EEntityRefType getRefType()
- Returns:
- Whether the entity is referenced by type or by name.
-
getUuidRef
public UuidEntityRef getUuidRef()
- Returns:
- The UUID of the entity, when
getRefType()
isEEntityRefType.UUID
.
-
setNameRef
public void setNameRef(String nameRef)
- Parameters:
nameRef
- Name of the entity, whengetRefType()
isEEntityRefType.NAME_VALUE
.
-
setRefType
public void setRefType(EEntityRefType refType)
- Parameters:
refType
- Whether the entity is referenced by type or by name.
-
setUuidRef
public void setUuidRef(UuidEntityRef uuidRef)
- Parameters:
uuidRef
- The UUID of the entity, whengetRefType()
isEEntityRefType.UUID
.
-
forNameValue
public static EntityRef forNameValue(String nameRef)
- Parameters:
nameRef
- Name of the entity- Returns:
- A new entity ref by name.
-
forUuidEntity
public static EntityRef forUuidEntity(IUUIDEntity entity)
- Parameters:
entity
- UUID of the entity to reference.- Returns:
- A new entity ref by UUID.
-
forUuidEntityRef
public static EntityRef forUuidEntityRef(UuidEntityRef uuidEntityRef)
- Parameters:
uuidEntityRef
- Entity to reference.- Returns:
- A new entity ref by UUID.
-
-