|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.grails.validation.DefaultConstraintEvaluator
public class DefaultConstraintEvaluator extends java.lang.Object
Default implementation of the ConstraintsEvaluator interface. TODO: Subclass this to add hibernate-specific exceptions!
Constructor Summary | |
DefaultConstraintEvaluator(java.util.Map defaultConstraints)
|
|
DefaultConstraintEvaluator()
|
Method Summary | |
---|---|
protected void
|
applyDefaultConstraints(java.lang.String propertyName, GrailsDomainClassProperty p, ConstrainedProperty cp, java.util.Map defaultConstraints)
|
protected void
|
applyDefaultNullableConstraint(GrailsDomainClassProperty p, ConstrainedProperty cp)
|
protected void
|
applyDefaultNullableConstraint(ConstrainedProperty cp)
|
protected void
|
applyMapOfConstraints(java.util.Map constraints, java.lang.String propertyName, GrailsDomainClassProperty p, ConstrainedProperty cp)
|
protected void
|
applySharedConstraints(ConstrainedPropertyBuilder constrainedPropertyBuilder, java.util.Map constrainedProperties)
|
protected boolean
|
canApplyNullableConstraint(java.lang.String propertyName, GrailsDomainClassProperty property, ConstrainedProperty constrainedProperty)
|
protected boolean
|
canPropertyBeConstrained(GrailsDomainClassProperty property)
|
java.util.Map
|
evaluate(java.lang.Class cls)
|
java.util.Map
|
evaluate(GrailsDomainClass cls)
|
java.util.Map
|
evaluate(java.lang.Object object, GrailsDomainClassProperty[] properties)
|
java.util.Map
|
evaluate(java.lang.Class cls, GrailsDomainClassProperty[] properties)
|
protected java.util.Map
|
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)
|
java.util.Map
|
getDefaultConstraints()
|
static java.util.LinkedList
|
getSuperClassChain(java.lang.Class theClass)
|
protected boolean
|
isConstrainableProperty(GrailsDomainClassProperty p, java.lang.String propertyName)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Constructor Detail |
---|
public DefaultConstraintEvaluator(java.util.Map defaultConstraints)
public DefaultConstraintEvaluator()
Method Detail |
---|
@SuppressWarnings("unchecked") protected void applyDefaultConstraints(java.lang.String propertyName, GrailsDomainClassProperty p, ConstrainedProperty cp, @SuppressWarnings("hiding") java.util.Map defaultConstraints)
protected void applyDefaultNullableConstraint(@SuppressWarnings("unused") GrailsDomainClassProperty p, ConstrainedProperty cp)
protected void applyDefaultNullableConstraint(ConstrainedProperty cp)
protected void applyMapOfConstraints(java.util.Map constraints, java.lang.String propertyName, GrailsDomainClassProperty p, ConstrainedProperty cp)
protected void applySharedConstraints(ConstrainedPropertyBuilder constrainedPropertyBuilder, java.util.Map constrainedProperties)
protected boolean canApplyNullableConstraint(java.lang.String propertyName, GrailsDomainClassProperty property, ConstrainedProperty constrainedProperty)
protected boolean canPropertyBeConstrained(@SuppressWarnings("unused") GrailsDomainClassProperty property)
public java.util.Map evaluate(@SuppressWarnings("rawtypes") java.lang.Class cls)
public java.util.Map evaluate(GrailsDomainClass cls)
public java.util.Map evaluate(java.lang.Object object, GrailsDomainClassProperty[] properties)
public java.util.Map evaluate(java.lang.Class cls, GrailsDomainClassProperty[] properties)
protected java.util.Map evaluateConstraints(java.lang.Class theClass, GrailsDomainClassProperty[] properties)
theClass
- The domain class to evaluate constraints forproperties
- The properties of the instance
protected groovy.lang.Closure getConstraintsFromScript(java.lang.Class theClass)
public java.util.Map getDefaultConstraints()
public static java.util.LinkedList getSuperClassChain(java.lang.Class theClass)
protected boolean isConstrainableProperty(GrailsDomainClassProperty p, java.lang.String propertyName)
Groovy Documentation