com.streambase.liveview.client.dynamictables

## 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 and Description
    `RuleCase()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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
    `void` | `addInsertAssignment(Assignment assignment)` Add one insertAssignment
    `void` | `addUpdateAssignment(Assignment assignment)` Add one updateAssignment
    `List<Assignment>` | `getInsertAssignments()`
    `String` | `getTest()`
    `List<Assignment>` | `getUpdateAssignments()`
    `boolean` | `isComplete(boolean testRequired)`
    `void` | `setTest(String test)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RuleCase

          public RuleCase()

  - ### Method Detail

    - #### getTest

          public String getTest()

      Returns:
        the test

    - #### setTest

          public void setTest(String test)

      Parameters:
        `test` - the test to set. Note that this is will be ignored when used as a default RuleCase

    - #### getInsertAssignments

          public List<Assignment> getInsertAssignments()

      Returns:
        the insertAssignments

    - #### addInsertAssignment

          public void addInsertAssignment(Assignment assignment)

      Add one insertAssignment
      Parameters:
        `assignment` -

    - #### getUpdateAssignments

          public List<Assignment> getUpdateAssignments()

      Returns:
        the updateAssignments

    - #### addUpdateAssignment

          public void addUpdateAssignment(Assignment assignment)

      Add one updateAssignment
      Parameters:
        `assignment` -

    - #### 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. Required
        `insertValue` - Insert Value. May be null
        `updateValue` - Update Value. May be null

    - #### isComplete

          public boolean isComplete(boolean testRequired)

      Parameters:
        `b` -
      Returns:

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.