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.
  • Constructor Details

    • RuleCase

      public RuleCase()
  • Method Details

    • getTest

      public String getTest()
      This method returns the test for this RuleCase
      the test for the RuleCase
    • setTest

      public void setTest(String test)
      The method is used to set the test for the RuleCase. Note that this will be ignored when used as a default RuleCase.
      test - the test to set.
    • getInsertAssignments

      public List<Assignment> getInsertAssignments()
      Gets the list of all insert Assignment.
      the list of all insert Assignment.
    • addInsertAssignment

      public void addInsertAssignment(Assignment assignment)
      Add one insertAssignment to the RuleCase.
      assignment - the insert Assignment.
    • setInsertAssignments

      public void setInsertAssignments(List<Assignment> insertAssignments)
    • getUpdateAssignments

      public List<Assignment> getUpdateAssignments()
      Gets the list of all update Assignment.
      the list of all update Assignment.
    • addUpdateAssignment

      public void addUpdateAssignment(Assignment assignment)
      Add one updateAssignment to the RuleCase.
      assignment - the update Assignment.
    • 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
      fieldName - The field name. Required
      insertValue - Insert Value. May be null
      updateValue - Update Value. May be null
    • isComplete

      public boolean isComplete(boolean testRequired)
      Method is used to check completeness of the RuleCase.
      testRequired - the boolean flag if true, the test is required for this RuleCase, if false, test is not required.
      true if the RuleCase is complete, false otherwise.