All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, Constraint

public class CaseConstraint extends BaseConstraint
CaseConstraint is imposed only when a certain condition is met

For example, if the country attribute value is "USA", then a prerequisite constraint may be imposed that the 'State' attribute is non-null.

This class is a direct copy of one that was in Kuali Student.

Since:
1.1
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Field Details

    • propertyName

      protected String propertyName
    • operator

      protected String operator
    • caseSensitive

      protected boolean caseSensitive
    • whenConstraint

      protected List<WhenConstraint> whenConstraint
  • Constructor Details

    • CaseConstraint

      public CaseConstraint()
  • Method Details

    • getWhenConstraint

      public List<WhenConstraint> getWhenConstraint()
      get the WhenConstraint's defined by this case constraint
      Returns:
      a list of constraints, null if not initialized
    • setWhenConstraint

      public void setWhenConstraint(List<WhenConstraint> whenConstraint)
      sets the WhenConstraint's defined by this case constraint
      Parameters:
      whenConstraint - - the list of constraints
    • getPropertyName

      public String getPropertyName()
      gets the property name for the attribute to which the case constraint is applied to
      Returns:
      the property name
    • setPropertyName

      public void setPropertyName(String propertyName)
      setter for property name
      Parameters:
      propertyName - a valid property name
    • getOperator

      public String getOperator()
      specifies the kind of relationship to be checked between the actual value and the ones defined in the getWhenConstraint()
      Returns:
      an operator name
      See Also:
    • setOperator

      public void setOperator(String operator)
      setter for the operator
      Parameters:
      operator -
      See Also:
    • isCaseSensitive

      public boolean isCaseSensitive()
      checks whether string comparison will be carried out in a case sensitive fashion
      Returns:
      true if string comparison is case sensitive, false if not
    • setCaseSensitive

      public void setCaseSensitive(boolean caseSensitive)
      setter for case sensitive
      Parameters:
      caseSensitive - - the case sensitive value to set
    • completeValidation

      public void completeValidation(ValidationTrace tracer)
      Validates different requirements of component compiling a series of reports detailing information on errors found in the component. Used by the RiceDictionaryValidator.
      Overrides:
      completeValidation in class BaseConstraint
      Parameters:
      tracer - Record of component's location