org.kuali.rice.krad.datadictionary.validation.constraint
Class SimpleConstraint

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
      extended by org.kuali.rice.krad.datadictionary.validation.constraint.SimpleConstraint
All Implemented Interfaces:
Serializable, 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:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, messageComponentCode, messageKey, messageNamespaceCode, states, validationMessageParams
 
Constructor Summary
SimpleConstraint()
           
 
Method Summary
 DataType getDataType()
          gets the type of an attribute definition
 String getExclusiveMin()
          Exclusive minimum value for this field
 String getInclusiveMax()
          Inclusive max value for this field
 Integer getMaxLength()
          The maximum amount of characters this field's value can be
 Integer getMaxOccurs()
          The maximum amount of items in this field's list of values - not yet used/do not use
 Integer getMinLength()
          The minimum amount of characters this field's value has to be
 Integer getMinOccurs()
          The minimum amount of items in this fields list of values - not yet used/do not use
 Boolean getRequired()
          If true the field is required
 Boolean isRequired()
           
 void setDataType(DataType dataType)
           
 void setExclusiveMin(String exclusiveMin)
           
 void setInclusiveMax(String inclusiveMax)
           
 void setMaxLength(Integer maxLength)
           
 void setMaxOccurs(Integer maxOccurs)
           
 void setMinLength(Integer minLength)
           
 void setMinOccurs(Integer minOccurs)
           
 void setRequired(Boolean required)
           
 
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
completeValidation, getApplyClientSide, getConstraintStateOverrides, getMessageComponentCode, getMessageKey, getMessageNamespaceCode, getStates, getValidationMessageParams, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setMessageComponentCode, setMessageKey, setMessageNamespaceCode, setStates, setValidationMessageParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleConstraint

public SimpleConstraint()
Method Detail

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:
ExistenceConstraint.isRequired()

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)


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.