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

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

Field Summary
protected  boolean caseSensitive
           
protected  String operator
           
protected  String propertyName
           
protected  List<WhenConstraint> whenConstraint
           
 
Fields inherited from class org.kuali.rice.krad.datadictionary.validation.constraint.BaseConstraint
applyClientSide, constraintStateOverrides, labelKey, states, validationMessageParams
 
Constructor Summary
CaseConstraint()
           
 
Method Summary
 String getOperator()
          specifies the kind of relationship to be checked between the actual value and the ones defined in the getWhenConstraint()
 String getPropertyName()
          gets the property name for the attribute to which the case constraint is applied to
 List<WhenConstraint> getWhenConstraint()
          get the WhenConstraint's defined by this case constraint
 boolean isCaseSensitive()
          checks whether string comparison will be carried out in a case sensitive fashion
 void setCaseSensitive(boolean caseSensitive)
          setter for case sensitive
 void setOperator(String operator)
          setter for the operator
 void setPropertyName(String propertyName)
          setter for property name
 void setWhenConstraint(List<WhenConstraint> whenConstraint)
          sets the WhenConstraint's defined by this case constraint
 
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
 

Field Detail

whenConstraint

protected List<WhenConstraint> whenConstraint

propertyName

protected String propertyName

operator

protected String operator

caseSensitive

protected boolean caseSensitive
Constructor Detail

CaseConstraint

public CaseConstraint()
Method Detail

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:
UifConstants.CaseConstraintOperators

setOperator

public void setOperator(String operator)
setter for the operator

Parameters:
operator -
See Also:
UifConstants.CaseConstraintOperators

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


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