Class MustOccurConstraint

  extended by org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
      extended by org.kuali.rice.krad.datadictionary.validation.constraint.MustOccurConstraint
All Implemented Interfaces:
Serializable, Constraint

public class MustOccurConstraint
extends BaseConstraint

Must occur constraints are constraints that indicate some range of acceptable valid results. So a must occur constraint might indicate that between 1 and 3 prequisite constraints must be valid. For example, on a person object, it might be that one of three fields must be filled in: 1. username 2. email 3. phone number By imposing a must occur constraint on the person object iself, and setting three prequisite constraints below it, with a min of 1 and a max of 3, this requirement can be enforced. A more complicated example might be that a US address is only valid if it provides either: (a) a city and state, or (b) a postal code To enforce this, a single must occur constraint would have two children: (1) a prequisite constraint on postal code, and (2) a must occur constraint with two child prequisite constraints, on city and state, respectively. By setting min=1/max=2 at the top must occur constraint, and min=2/max=2 at the leaf constraint, this requirement can be enforced.

Kuali Rice Team (
See Also:
Serialized Form

Field Summary
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, labelKey, states, validationMessageParams
Constructor Summary
Method Summary
 Integer getMax()
 Integer getMin()
 List<MustOccurConstraint> getMustOccurConstraints()
 List<PrerequisiteConstraint> getPrerequisiteConstraints()
 void setMax(Integer max)
 void setMin(Integer min)
 void setMustOccurConstraints(List<MustOccurConstraint> occurs)
 void setPrerequisiteConstraints(List<PrerequisiteConstraint> prerequisiteConstraints)
Methods inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
getApplyClientSide, getConstraintStateOverrides, getLabelKey, getStates, getValidationMessageParams, getValidationMessageParamsArray, setApplyClientSide, setConstraintStateOverrides, setLabelKey, setStates, setValidationMessageParams
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public MustOccurConstraint()
Method Detail


public List<PrerequisiteConstraint> getPrerequisiteConstraints()


public void setPrerequisiteConstraints(List<PrerequisiteConstraint> prerequisiteConstraints)


public List<MustOccurConstraint> getMustOccurConstraints()


public void setMustOccurConstraints(List<MustOccurConstraint> occurs)


public Integer getMin()


public void setMin(Integer min)


public Integer getMax()


public void setMax(Integer max)

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