Package de.xima.fc.workflow
Class EntityRef
java.lang.Object
de.xima.fc.workflow.EntityRef
- All Implemented Interfaces:
Serializable
@NotEmptyIf(field="nameRef",
dependants="refType",
target=EntityRef.class)
public final class EntityRef
extends Object
implements Serializable
Model class for referencing an entity either by
UUID or name- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic EntityRefforNameValue(String nameRef) static EntityRefforUuidEntity(IUUIDEntity entity) static EntityRefforUuidEntityRef(UuidEntityRef uuidEntityRef) inthashCode()voidsetNameRef(String nameRef) voidsetRefType(EEntityRefType refType) voidsetUuidRef(UuidEntityRef uuidRef)
-
Constructor Details
-
EntityRef
public EntityRef()For JSON serialization / deserialization only. Use the static factory methods.
-
-
Method Details
-
equals
-
getNameRef
- Returns:
- Name of the entity, when
getRefType()isEEntityRefType.NAME_VALUE.
-
getRefType
- Returns:
- Whether the entity is referenced by type or by name.
-
getUuidRef
- Returns:
- The UUID of the entity, when
getRefType()isEEntityRefType.UUID.
-
hashCode
public int hashCode() -
setNameRef
- Parameters:
nameRef- Name of the entity, whengetRefType()isEEntityRefType.NAME_VALUE.
-
setRefType
- Parameters:
refType- Whether the entity is referenced by type or by name.
-
setUuidRef
- Parameters:
uuidRef- The UUID of the entity, whengetRefType()isEEntityRefType.UUID.
-
forNameValue
- Parameters:
nameRef- Name of the entity- Returns:
- A new entity reference by name.
-
forUuidEntity
- Parameters:
entity- UUID of the entity to reference.- Returns:
- A new entity reference by UUID.
-
forUuidEntityRef
- Parameters:
uuidEntityRef- Entity to reference.- Returns:
- A new entity reference by UUID.
-