org.codehaus.groovy.grails.orm.hibernate.validation
Class AbstractPersistentConstraint

java.lang.Object
  extended by org.codehaus.groovy.grails.validation.AbstractConstraint
      extended by org.codehaus.groovy.grails.orm.hibernate.validation.AbstractPersistentConstraint
All Implemented Interfaces:
PersistentConstraint, Constraint
Direct Known Subclasses:
UniqueConstraint

abstract class AbstractPersistentConstraint
extends AbstractConstraint
implements PersistentConstraint

Class description here.

Since:
0.4

Created: Jan 23, 2007 Time: 1:58:21 PM

Author:
Graeme Rocher

Field Summary
protected  HibernateTemplate constraintHibernateTemplate
           
 
Fields inherited from class org.codehaus.groovy.grails.validation.AbstractConstraint
classShortName, constraintOwningClass, constraintParameter, constraintPropertyName, messageSource
 
Constructor Summary
AbstractPersistentConstraint()
           
 
Method Summary
 void setHibernateTemplate(HibernateTemplate template)
          Sets the hibernate template to use for the persistent constraint
 void validate(Object target, Object propertyValue, Errors errors)
          Validate this constraint against a property value
 
Methods inherited from class org.codehaus.groovy.grails.validation.AbstractConstraint
getDefaultMessage, getPropertyName, processValidate, rejectValue, rejectValue, rejectValue, rejectValue, rejectValue, rejectValueWithDefaultMessage, setMessageSource, setOwningClass, setParameter, setPropertyName, skipEmptyStrings, skipNullValues, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.codehaus.groovy.grails.validation.Constraint
getName, getPropertyName, setMessageSource, setOwningClass, setParameter, setPropertyName, supports
 

Field Detail

constraintHibernateTemplate

protected HibernateTemplate constraintHibernateTemplate
Constructor Detail

AbstractPersistentConstraint

AbstractPersistentConstraint()
Method Detail

setHibernateTemplate

public void setHibernateTemplate(HibernateTemplate template)
Description copied from interface: PersistentConstraint
Sets the hibernate template to use for the persistent constraint

Specified by:
setHibernateTemplate in interface PersistentConstraint

validate

public void validate(Object target,
                     Object propertyValue,
                     Errors errors)
Description copied from interface: Constraint
Validate this constraint against a property value

Specified by:
validate in interface Constraint
Overrides:
validate in class AbstractConstraint
propertyValue - The property value to validate
errors - The errors instance to record errors against


Copyright (c) 2005-2006 The Grails project