public class DefaultConstraintEvaluator
Default implementation of the ConstraintsEvaluator interface. TODO: Subclass this to add hibernate-specific exceptions!
Constructor and description |
---|
DefaultConstraintEvaluator
(Map<String, Object> defaultConstraints) |
DefaultConstraintEvaluator
() |
Type | Name and description |
---|---|
protected void |
applyDefaultConstraints(java.lang.String propertyName, GrailsDomainClassProperty p, Constrained cp, Map<String, Object> defaultConstraints) |
protected void |
applyDefaultNullableConstraint(GrailsDomainClassProperty p, Constrained cp) |
protected void |
applyDefaultNullableConstraint(Constrained cp) |
protected void |
applyMapOfConstraints(Map<String, Object> constraints, java.lang.String propertyName, GrailsDomainClassProperty p, Constrained cp) |
protected void |
applySharedConstraints(ConstrainedPropertyBuilder constrainedPropertyBuilder, Map<String, Constrained> constrainedProperties) |
protected boolean |
canApplyNullableConstraint(java.lang.String propertyName, GrailsDomainClassProperty property, Constrained constrained) |
protected boolean |
canPropertyBeConstrained(GrailsDomainClassProperty property) |
Map<String, Constrained> |
evaluate(java.lang.Class cls) |
Map<String, Constrained> |
evaluate(GrailsDomainClass cls) |
Map<String, Constrained> |
evaluate(java.lang.Object object, GrailsDomainClassProperty[] properties) |
Map<String, Constrained> |
evaluate(java.lang.Class<?> cls, GrailsDomainClassProperty[] properties) |
protected Map<String, Constrained> |
evaluateConstraints(java.lang.Class<?> theClass, GrailsDomainClassProperty[] properties) Evaluates the constraints closure to build the list of constraints |
protected groovy.lang.Closure<?> |
getConstraintsFromScript(java.lang.Class<?> theClass) |
Map<String, Object> |
getDefaultConstraints() |
static java.util.LinkedList<?> |
getSuperClassChain(java.lang.Class<?> theClass) |
protected boolean |
isConstrainableProperty(GrailsDomainClassProperty p, java.lang.String propertyName) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Evaluates the constraints closure to build the list of constraints
theClass
- The domain class to evaluate constraints forproperties
- The properties of the instance