public class OdiCaseWhen extends OdiLoadPlanCaseCondition
This class represents the 'when' clause in a "case-when-else" step of an OdiLoadPlan
.
It's part of an aggregate managed by OdiLoadPlanStepCase
. Its life cycle is managed by the OdiLoadPlanStepCase
class,
which in turn is managed by the OdiLoadPlan
class.
An OdiCaseWhen
life cycle begins when the user has created a OdiLoadPlanStepCase
in an OdiLoadPlan
and starts adding When clauses.
It's then typically stored in the runtime repository when the OdiLoadPlan
is persisted.
The users can modify the OdiCaseWhen
to fit their needs.
The life cycle ends when the OdiCaseWhen
is removed from the OdiLoadPlanStepCase
.
The OdiCaseWhen defines an comparison on the variable chosen in the OdiLoadPlanStepCase
and a root OdiLoadPlanStep
that will describe the action to execute if the comparison is true.
By Default the root step is serial.
Order is managed at creation time. When moving, order is managed by the step container. Order is then managed when removing a child.
OdiLoadPlan
,
OdiLoadPlanStepCase
Modifier and Type | Class and Description |
---|---|
static class |
OdiCaseWhen.ComparisonOperator
Comparisons possible for the OdiLoadPlanVariable defined on the parent
OdiLoadPlanStepCase . |
NAME_MAX_LENGTH
Modifier and Type | Method and Description |
---|---|
java.io.Serializable |
getInternalId() |
int |
getOrder() |
OdiCaseWhen.ComparisonOperator |
getTestOperator() |
java.lang.Object |
getValue() |
void |
setOrder(int order) |
void |
setTestOperator(OdiCaseWhen.ComparisonOperator testOperator) |
void |
setValue(java.lang.Object pValue) |
copy, duplicate, duplicate, getParentElement, getRootStep, isEnabled, setEnabled
getLoadPlan, getName, getSecurityContainer, getStepId, hasDisabledParent, setName, toString
public java.io.Serializable getInternalId()
getInternalId
in class OdiLoadPlanCaseCondition
public OdiCaseWhen.ComparisonOperator getTestOperator()
OdiLoadPlanVariable
defined in the parent OdiLoadPlanStepCase
.OdiCaseWhen.ComparisonOperator
,
setTestOperator(ComparisonOperator)
public void setTestOperator(OdiCaseWhen.ComparisonOperator testOperator)
testOperator
- Operator used for the test on the OdiLoadPlanVariable
defined in the parent OdiLoadPlanStepCase
. Must not be null.DomainRuntimeException
- if the testOperator is nullOdiCaseWhen.ComparisonOperator
,
getTestOperator()
public java.lang.Object getValue()
OdiLoadPlanStepCase
variable is testedsetValue(Object)
public void setValue(java.lang.Object pValue)
value
- Value against which the OdiLoadPlanStepCase
variable is tested. Must not be nullgetValue()
public void setOrder(int order)
Defines
- the order of this case when in the OdiLoadPlanStepCase
.getOrder()
,
OdiLoadPlanStepSerial
public int getOrder()
OdiLoadPlanStepCase
.setOrder(int)
,
OdiLoadPlanStepCase