@groovy.transform.CompileStatic class PersistentEntityValidator extends java.lang.Object implements CascadingValidator, ConstrainedEntity
A Validator that validates a PersistentEntity against known constraints
| Modifiers | Name | Description | 
|---|---|---|
protected ProxyHandler  | 
                            proxyHandler | 
                            
| Type | Name and description | 
|---|---|
java.util.Map<java.lang.String, ConstrainedProperty>  | 
                            constrainedProperties | 
                        
PersistentEntity  | 
                            entity | 
                        
EntityReflector  | 
                            entityReflector | 
                        
MessageSource  | 
                            messageSource | 
                        
java.lang.Class  | 
                            targetClass | 
                        
BeforeValidateHelper  | 
                            validateHelper | 
                        
| Constructor and description | 
|---|
                                PersistentEntityValidator(PersistentEntity entity, MessageSource messageSource, ConstraintsEvaluator constraintsEvaluator) | 
                        
| Type Params | Return Type | Name and description | 
|---|---|---|
 | 
                            protected void | 
                            cascadeToAssociativeProperty(java.lang.Object parent, Errors errors, EntityReflector reflector, Association association, java.util.Set validatedObjects)Cascades validation onto an associative property maybe a one-to-many, one-to-one or many-to-one relationship.  | 
                        
 | 
                            protected void | 
                            cascadeValidationToMany(java.lang.Object parentObject, java.lang.String propertyName, Association association, Errors errors, EntityReflector entityReflector, java.util.Set validatedObjects)Cascades validation to a one-to-many type relationship.  | 
                        
 | 
                            protected void | 
                            cascadeValidationToOne(java.lang.Object parentObject, java.lang.String propertyName, Association association, Errors errors, EntityReflector reflector, java.lang.Object associatedObject, java.lang.Object indexOrKey, java.util.Set validatedObjects)Cascades validation to a one-to-one or many-to-one property.  | 
                        
 | 
                            protected Errors | 
                            retrieveErrors(java.lang.Object associatedObject) | 
                        
 | 
                            boolean | 
                            supports(java.lang.Class<?> clazz) | 
                        
 | 
                            void | 
                            validate(java.lang.Object obj, Errors errors, boolean cascade) | 
                        
| Methods inherited from class | Name | 
|---|---|
class java.lang.Object | 
                            java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) | 
                        
Cascades validation onto an associative property maybe a one-to-many, one-to-one or many-to-one relationship.
errors -  The Errors instnacebean -  The original beanassociation -  The associative propertyCascades validation to a one-to-many type relationship. Normally a collection such as a List or Set each element in the association will also be validated.
errors -  The Errors instanceentityReflector -  The entity reflectorassociation -  An association whose isOneToMeny() method returns truepropertyName -  The name of the propertyCascades validation to a one-to-one or many-to-one property.
errors -  The Errors instancebean -  The original BeanWrapperassociatedObject -  The associated object's current valueassociation -  The GrailsDomainClassProperty instancepropertyName -  The name of the propertyGroovy Documentation