org.codehaus.groovy.grails.orm.hibernate.validation
Class AbstractPersistentConstraint
java.lang.Object
org.codehaus.groovy.grails.validation.AbstractConstraint
org.codehaus.groovy.grails.orm.hibernate.validation.AbstractPersistentConstraint
- All Implemented Interfaces:
- PersistentConstraint, Constraint, ApplicationContextAware
- Direct Known Subclasses:
- UniqueConstraint
abstract class AbstractPersistentConstraint
- extends AbstractConstraint
- implements PersistentConstraint
Constraints that require access to the HibernateTemplate should subclass this class
- Since:
- 0.4
Created: Jan 23, 2007
Time: 1:58:21 PM
- Author:
- Graeme Rocher
Methods inherited from class org.codehaus.groovy.grails.validation.AbstractConstraint |
checkState, getDefaultMessage, getPropertyName, processValidate, rejectValue, rejectValue, rejectValue, rejectValue, rejectValue, rejectValueWithDefaultMessage, setMessageSource, setOwningClass, setParameter, setPropertyName, skipNullValues, toString |
AbstractPersistentConstraint
AbstractPersistentConstraint()
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
throws BeansException
- Specified by:
setApplicationContext
in interface ApplicationContextAware
- Throws:
BeansException
getHibernateTemplate
public HibernateTemplate getHibernateTemplate()
- Description copied from interface:
PersistentConstraint
- Obtains the HibernateTemplate
- Specified by:
getHibernateTemplate
in interface PersistentConstraint
- Returns:
- The HibernateTemplate instance
validate
public void validate(Object target,
Object propertyValue,
Errors errors)
- Description copied from interface:
Constraint
- Validate this constraint against a property value. If implementation is vetoing (isVetoing() method
returns true), then it could return 'true' to stop further validation.
- Specified by:
validate
in interface Constraint
- Overrides:
validate
in class AbstractConstraint
propertyValue
- The property value to validateerrors
- The errors instance to record errors against
Copyright (c) 2005-2006 The Grails project