All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, Constraint, DataTypeConstraint, ExistenceConstraint, LengthConstraint, RangeConstraint

public class SimpleConstraint extends BaseConstraint implements ExistenceConstraint, RangeConstraint, LengthConstraint
A simple constraint stores 'basic' constraints for a field. This constraint is meant to be used as a constraint for WhenConstraints in CaseConstraint, and is also used internally in InputField.
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • SimpleConstraint

      public SimpleConstraint()
  • Method Details

    • getRequired

      public Boolean getRequired()
      If true the field is required
      Returns:
      the required
    • setRequired

      public void setRequired(Boolean required)
      Parameters:
      required - the required to set
    • isRequired

      public Boolean isRequired()
      Specified by:
      isRequired in interface ExistenceConstraint
      See Also:
    • getMaxLength

      public Integer getMaxLength()
      The maximum amount of characters this field's value can be
      Specified by:
      getMaxLength in interface LengthConstraint
      Returns:
      the maxLength
    • setMaxLength

      public void setMaxLength(Integer maxLength)
      Parameters:
      maxLength - the maxLength to set
    • getMinLength

      public Integer getMinLength()
      The minimum amount of characters this field's value has to be
      Specified by:
      getMinLength in interface LengthConstraint
      Returns:
      the minLength
    • setMinLength

      public void setMinLength(Integer minLength)
      Parameters:
      minLength - the minLength to set
    • getExclusiveMin

      public String getExclusiveMin()
      Exclusive minimum value for this field
      Specified by:
      getExclusiveMin in interface RangeConstraint
      Returns:
      the exclusiveMin
    • setExclusiveMin

      public void setExclusiveMin(String exclusiveMin)
      Parameters:
      exclusiveMin - the exclusiveMin to set
    • getInclusiveMax

      public String getInclusiveMax()
      Inclusive max value for this field
      Specified by:
      getInclusiveMax in interface RangeConstraint
      Returns:
      the inclusiveMax
    • setInclusiveMax

      public void setInclusiveMax(String inclusiveMax)
      Parameters:
      inclusiveMax - the inclusiveMax to set
    • getMinOccurs

      public Integer getMinOccurs()
      The minimum amount of items in this fields list of values - not yet used/do not use
      Returns:
      the minOccurs
    • setMinOccurs

      public void setMinOccurs(Integer minOccurs)
      Parameters:
      minOccurs - the minOccurs to set
    • getMaxOccurs

      public Integer getMaxOccurs()
      The maximum amount of items in this field's list of values - not yet used/do not use
      Returns:
      the maxOccurs
    • setMaxOccurs

      public void setMaxOccurs(Integer maxOccurs)
      Parameters:
      maxOccurs - the maxOccurs to set
    • getDataType

      public DataType getDataType()
      Description copied from interface: DataTypeConstraint
      gets the type of an attribute definition
      Specified by:
      getDataType in interface DataTypeConstraint
      Returns:
      the data type
    • setDataType

      public void setDataType(DataType dataType)