use of org.grails.validation.NullableConstraint in project grails-core by grails.
the class ConstrainedProperty method setNullable.
/**
* @param nullable The nullable to set.
*/
public void setNullable(boolean nullable) {
NullableConstraint nc = (NullableConstraint) appliedConstraints.get(NULLABLE_CONSTRAINT);
if (nc == null) {
nc = new NullableConstraint();
nc.setOwningClass(owningClass);
nc.setPropertyName(propertyName);
appliedConstraints.put(NULLABLE_CONSTRAINT, nc);
}
nc.setParameter(nullable);
}
Aggregations