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,
Serialized Form| 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()
Provides a common getter for the persistence layer to obtain an identity,
irrespective of the actual type of identity used.
|
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, setEnabledgetLoadPlan, getName, getStepId, hasDisabledParent, setName, toStringpublic java.io.Serializable getInternalId()
IRepositoryEntity
Typically a subclass will delegate to a public
SomePrimitiveWrapper getId() method. The necessity for the
getInternalId() abstract method is solely because the
persistence layer needs a way of obtaining the identity irrespective of
the actual identity implementation choice.
Returning null from this method will indicate the object has
never been saved. This will likely be relied on by some DAO
implementations.
getInternalId in interface IRepositoryEntitygetInternalId in class OdiLoadPlanCaseConditionpublic 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(),
OdiLoadPlanStepSerialpublic int getOrder()
OdiLoadPlanStepCase.setOrder(int),
OdiLoadPlanStepCase