Search in sources :

Example 1 with NullableConstraint

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);
}
Also used : NullableConstraint(org.grails.validation.NullableConstraint)

Aggregations

NullableConstraint (org.grails.validation.NullableConstraint)1