org.codehaus.groovy.grails.validation
Class HibernateDomainClassValidator

java.lang.Object
  extended by org.codehaus.groovy.grails.validation.GrailsDomainClassValidator
      extended by org.codehaus.groovy.grails.validation.HibernateDomainClassValidator
All Implemented Interfaces:
CascadingValidator, Validator

public class HibernateDomainClassValidator
extends GrailsDomainClassValidator

A validator that first checks if the Hibernate PersistentCollection instance has been initialised before bothering to cascade

Since:
0.5

Created: Apr 13, 2007 Time: 6:32:08 PM

Author:
Graeme Rocher

Constructor Summary
HibernateDomainClassValidator()
           
 
Method Summary
protected  void cascadeValidationToMany(Errors errors, BeanWrapper bean, GrailsDomainClassProperty persistentProperty, String propertyName)
          Overrides the default behaviour and first checks if a PersistentCollection instance has been initialised using the wasInitialised() method before cascading
 
Methods inherited from class org.codehaus.groovy.grails.validation.GrailsDomainClassValidator
cascadeToAssociativeProperty, cascadeValidationToOne, getDomainClass, setDomainClass, setMessageSource, supports, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateDomainClassValidator

public HibernateDomainClassValidator()
Method Detail

cascadeValidationToMany

protected void cascadeValidationToMany(Errors errors,
                                       BeanWrapper bean,
                                       GrailsDomainClassProperty persistentProperty,
                                       String propertyName)
Overrides the default behaviour and first checks if a PersistentCollection instance has been initialised using the wasInitialised() method before cascading

Overrides:
cascadeValidationToMany in class GrailsDomainClassValidator
Parameters:
errors - The Spring Errors instance
bean - The BeanWrapper for the bean
persistentProperty - The GrailsDomainClassProperty instance
propertyName - The name of the property
See Also:
PersistentCollection.wasInitialized()


Copyright (c) 2005-2006 The Grails project