Package de.xima.fc.entities
Class WorkflowNode
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.AWorkflowElement<WorkflowNode,WorkflowNodeSearchTerm>
de.xima.fc.entities.WorkflowNode
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>
,de.xima.cmn.dao.interfaces.ILockableEntity<Long>
,IDescriptionProviding
,ILockingVersionProviding
,INameProviding
,ITransferable
,ITransferableEntity
,ITransferableLockableEntity
,IUUIDEntity
,IActiveFlagProviding
,ICustomParametersProviding
,IElementKeyProviding
,IElementSearchTermsProviding
,IIdProviding<Long>
,IUuidProviding
,IVersionedCustomParametersProviding
,IWorkflowElementEntity
,IWorkflowElementTypeProviding
,IWorkflowNodeTypeProviding
,Serializable
,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity
public class WorkflowNode
extends AWorkflowElement<WorkflowNode,WorkflowNodeSearchTerm>
implements IWorkflowNodeTypeProviding
A workflow node that represents a statement in a workflow task. Each node can be thought of as a statement node in
the syntax tree of a structured program. The graph formed by the
getParent()
and getChildren()
relations must be a tree.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
JPA attribute name for thegetChildren()
field.static final String
JPA attribute name for thegetParent()
field.static final String
Database column name for thegetParent()
field.static final String
The index at which this entity appear ingetChildren()
.Fields inherited from class de.xima.fc.entities.AWorkflowElement
active, ATTR_ACTIVE, ATTR_CUSTOM_PARAMETERS, ATTR_CUSTOM_PARAMETERS_VERSION, ATTR_DESCRIPTION, ATTR_SEARCH_TERMS, ATTR_TASK, ATTR_TYPE, COL_ACTIVE, COL_CUSTOM_PARAMETERS, COL_CUSTOM_PARAMETERS_VERSION, COL_DESCRIPTION, COL_NAME, COL_TASK, COL_TYPE, customParameters, customParametersVersion, description, name, searchTerms, task, type, uuid
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
Fields inherited from interface de.xima.fc.entities.interfaces.IDescriptionProviding
ATTR_BESCHREIBUNG
Fields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_ID
Fields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSION
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, TYPE_NAME_UUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(int index, WorkflowNode child) Adds a child node to the tail of the existing children, and sets the parent of the given node to this node.void
addChild
(WorkflowNode child) Adds a child node to the tail of the existing children, and sets the parent of the given node to this node.getId()
getKey()
void
putSearchTerm
(WorkflowNodeSearchTerm searchTerm) Adds the given search term to this element, and setsAWorkflowElementSearchTerm.getElement()
to this element.void
setChildren
(List<WorkflowNode> children) void
setParent
(WorkflowNode parent) toString()
Methods inherited from class de.xima.fc.entities.AWorkflowElement
cloneBasics, getBeschreibung, getCustomParameters, getCustomParametersVersion, getDescription, getName, getTask, getType, getUuid, getUUID, getUUIDObject, isActive, setActive, setCustomParameters, setCustomParametersVersion, setDescription, setName, setSearchTerms, setTask, setType, setUUID, setUUIDObject
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setId
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface de.xima.fc.interfaces.workflow.ICustomParametersProviding
getCustomParametersJson
Methods inherited from interface de.xima.cmn.dao.interfaces.IEntity
isPersisted, setId
Methods inherited from interface de.xima.fc.interfaces.workflow.IWorkflowElementEntity
setCustomParametersJson
Methods inherited from interface de.xima.fc.interfaces.workflow.IWorkflowElementTypeProviding
getType
-
Field Details
-
ATTR_CHILDREN
JPA attribute name for thegetChildren()
field.- See Also:
-
ATTR_PARENT
JPA attribute name for thegetParent()
field.- See Also:
-
COL_PARENT
Database column name for thegetParent()
field.- See Also:
-
COL_PARENT_ORDER_INDEX
The index at which this entity appear ingetChildren()
.- See Also:
-
-
Constructor Details
-
WorkflowNode
public WorkflowNode()
-
-
Method Details
-
addChild
Adds a child node to the tail of the existing children, and sets the parent of the given node to this node.- Parameters:
child
- The child node to add.
-
addChild
Adds a child node to the tail of the existing children, and sets the parent of the given node to this node.- Parameters:
index
- Position at which to add the child. When smaller than0
, the (current length of the children + 1) is added (-1
appends the item to the end of the list,-2
inserts the item as the second to last position etc.). Afterwards the index is clamped to the range[0, children.size()]
, so that no index out of bound exceptions can occur.child
- The child node to add.
-
getChildren
- Returns:
- A list of child nodes, i.e. the nodes that have this node set as their
getParent()
. Which and how many children a node must or can have depends on theAWorkflowElement.getType()
of this node. SeeEWorkflowNodeKind
for a list of built-in nodes. - See Also:
-
getId
- Specified by:
getId
in interfacede.xima.cmn.dao.interfaces.IEntity<Long>
- Specified by:
getId
in interfaceIIdProviding<Long>
- Returns:
- The ID that identifies this instance.
-
getKey
- Specified by:
getKey
in interfaceIElementKeyProviding
- Returns:
- The key that identifies this instance.
-
getParent
- Returns:
- The parent of this node, i.e. the node that contains this node in its
getChildren()
. The parent may be null if and only if it is the root node, i.e. the node pointed to byWorkflowTask.getRootNode()
. - See Also:
-
getSearchTerms
- Specified by:
getSearchTerms
in interfaceIElementSearchTermsProviding
- Returns:
- The search terms that were defined for this workflow element.
-
putSearchTerm
Adds the given search term to this element, and setsAWorkflowElementSearchTerm.getElement()
to this element.- Parameters:
searchTerm
- The search term to add to this element.
-
setChildren
- Parameters:
children
- A list of child nodes, i.e. the nodes that have this node set as theirgetParent()
. Which and how many children a node must or can have depends on theAWorkflowElement.getType()
of this node. SeeEWorkflowNodeKind
for a list of built-in nodes.- See Also:
-
setParent
- Parameters:
parent
- The parent of this node, i.e. the node that contains this node in itsgetChildren()
. The parent may be null if and only if it is the root node, i.e. the node pointed to byWorkflowTask.getRootNode()
.
-
toString
- Overrides:
toString
in classAbstractLockableEntity
-