use of org.grails.validation.InListConstraint in project grails-core by grails.
the class ConstrainedProperty method setInList.
/**
* @param inList The inList to set.
*/
@SuppressWarnings("rawtypes")
public void setInList(List inList) {
Constraint c = appliedConstraints.get(IN_LIST_CONSTRAINT);
if (inList == null) {
appliedConstraints.remove(IN_LIST_CONSTRAINT);
} else {
if (c == null) {
c = new InListConstraint();
c.setOwningClass(owningClass);
c.setPropertyName(propertyName);
appliedConstraints.put(IN_LIST_CONSTRAINT, c);
}
c.setParameter(inList);
}
}
Aggregations