|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.groovy.grails.validation.AbstractConstraint
org.codehaus.groovy.grails.orm.hibernate.validation.AbstractPersistentConstraint
public abstract class AbstractPersistentConstraint
Constraints that require access to the HibernateTemplate should subclass this class.
| Field Summary | |
|---|---|
protected org.springframework.context.ApplicationContext |
applicationContext
|
static java.lang.ThreadLocal<org.hibernate.SessionFactory> |
sessionFactory
|
| Fields inherited from class org.codehaus.groovy.grails.validation.AbstractConstraint |
|---|
classShortName, constraintOwningClass, constraintParameter, constraintPropertyName, messageSource |
| Constructor Summary | |
|---|---|
AbstractPersistentConstraint()
|
|
| Method Summary | |
|---|---|
org.springframework.orm.hibernate3.HibernateTemplate |
getHibernateTemplate()
Obtains the HibernateTemplate. |
boolean |
isValid()
Return whether the constraint is valid for the owning class |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
|
boolean |
supports(java.lang.Class type)
Returns whether the constraint supports being applied against the specified type; |
| Methods inherited from class org.codehaus.groovy.grails.validation.AbstractConstraint |
|---|
checkState, getDefaultMessage, getParameter, getPropertyName, processValidate, rejectValue, rejectValue, rejectValue, rejectValue, rejectValue, rejectValueWithDefaultMessage, setMessageSource, setOwningClass, setParameter, setPropertyName, skipBlankValues, skipNullValues, toString, validate |
| 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, getParameter, getPropertyName, setMessageSource, setOwningClass, setParameter, setPropertyName, validate |
| Field Detail |
|---|
public static java.lang.ThreadLocal<org.hibernate.SessionFactory> sessionFactory
protected org.springframework.context.ApplicationContext applicationContext
| Constructor Detail |
|---|
public AbstractPersistentConstraint()
| Method Detail |
|---|
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic org.springframework.orm.hibernate3.HibernateTemplate getHibernateTemplate()
PersistentConstraint
getHibernateTemplate in interface PersistentConstraintpublic boolean supports(java.lang.Class type)
supports in interface org.codehaus.groovy.grails.validation.Constrainttype - The type to support
public boolean isValid()
isValid in interface org.codehaus.groovy.grails.validation.ConstraintisValid in class org.codehaus.groovy.grails.validation.AbstractConstraint
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||