Class RuleCase
java.lang.Object
com.streambase.liveview.client.dynamictables.RuleCase
A RuleCase represents one case for a FieldRule, with a test, a list of assignments for
an insert operation, and a list of assignments for an update operation.
The first case whose test is true will be executed.
If none are true and there is a default case, that case will be executed.
If the RuleCase used as default includes a test, the test will be ignored.
- Since:
- 2.1.4
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFieldAssignment
(String fieldName, String insertValue, String updateValue) Shortcut for the most common case of adding a field assignment with an insert and an update valuevoid
addInsertAssignment
(Assignment assignment) Add one insertAssignment to theRuleCase
.void
addUpdateAssignment
(Assignment assignment) Add one updateAssignment to theRuleCase
.Gets the list of all insertAssignment
.getTest()
This method returns the test for thisRuleCase
Gets the list of all updateAssignment
.boolean
isComplete
(boolean testRequired) Method is used to check completeness of theRuleCase
.void
setInsertAssignments
(List<Assignment> insertAssignments) void
The method is used to set the test for theRuleCase
.void
setUpdateAssignments
(List<Assignment> updateAssignments)
-
Constructor Details
-
RuleCase
public RuleCase()
-
-
Method Details
-
getTest
This method returns the test for thisRuleCase
- Returns:
- the test for the
RuleCase
-
setTest
The method is used to set the test for theRuleCase
. Note that this will be ignored when used as a defaultRuleCase
.- Parameters:
test
- the test to set.
-
getInsertAssignments
Gets the list of all insertAssignment
.- Returns:
- the list of all insert
Assignment
.
-
addInsertAssignment
Add one insertAssignment to theRuleCase
.- Parameters:
assignment
- the insertAssignment
.
-
setInsertAssignments
-
getUpdateAssignments
Gets the list of all updateAssignment
.- Returns:
- the list of all update
Assignment
.
-
addUpdateAssignment
Add one updateAssignment to theRuleCase
.- Parameters:
assignment
- the updateAssignment
.
-
setUpdateAssignments
-
addFieldAssignment
Shortcut for the most common case of adding a field assignment with an insert and an update value- Parameters:
fieldName
- The field name. RequiredinsertValue
- Insert Value. May be nullupdateValue
- Update Value. May be null
-
isComplete
public boolean isComplete(boolean testRequired) Method is used to check completeness of theRuleCase
.
-