Class RuleCase
- java.lang.Object
-
- com.streambase.liveview.client.dynamictables.RuleCase
-
public class RuleCase extends Object
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
Constructors Constructor Description RuleCase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFieldAssignment(String fieldName, String insertValue, String updateValue)Shortcut for the most common case of adding a field assignment with an insert and an update valuevoidaddInsertAssignment(Assignment assignment)Add one insertAssignment to theRuleCase.voidaddUpdateAssignment(Assignment assignment)Add one updateAssignment to theRuleCase.List<Assignment>getInsertAssignments()Gets the list of all insertAssignment.StringgetTest()This method returns the test for thisRuleCaseList<Assignment>getUpdateAssignments()Gets the list of all updateAssignment.booleanisComplete(boolean testRequired)Method is used to check completeness of theRuleCase.voidsetInsertAssignments(List<Assignment> insertAssignments)voidsetTest(String test)The method is used to set the test for theRuleCase.voidsetUpdateAssignments(List<Assignment> updateAssignments)
-
-
-
Method Detail
-
getTest
public String getTest()
This method returns the test for thisRuleCase- Returns:
- the test for the
RuleCase
-
setTest
public void setTest(String test)
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
public List<Assignment> getInsertAssignments()
Gets the list of all insertAssignment.- Returns:
- the list of all insert
Assignment.
-
addInsertAssignment
public void addInsertAssignment(Assignment assignment)
Add one insertAssignment to theRuleCase.- Parameters:
assignment- the insertAssignment.
-
setInsertAssignments
public void setInsertAssignments(List<Assignment> insertAssignments)
-
getUpdateAssignments
public List<Assignment> getUpdateAssignments()
Gets the list of all updateAssignment.- Returns:
- the list of all update
Assignment.
-
addUpdateAssignment
public void addUpdateAssignment(Assignment assignment)
Add one updateAssignment to theRuleCase.- Parameters:
assignment- the updateAssignment.
-
setUpdateAssignments
public void setUpdateAssignments(List<Assignment> updateAssignments)
-
addFieldAssignment
public void addFieldAssignment(String fieldName, String insertValue, String updateValue)
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
-
-