|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethodInvocation
org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod
org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractSavePersistentMethod
public abstract class AbstractSavePersistentMethod
Abstract class for different implementations that perform saving to implement
Constructor Summary | |
---|---|
AbstractSavePersistentMethod(java.util.regex.Pattern pattern,
org.hibernate.SessionFactory sessionFactory,
java.lang.ClassLoader classLoader,
GrailsApplication application)
|
Method Summary | |
---|---|
protected java.lang.Object |
doInvokeInternal(java.lang.Object target,
java.lang.Object[] arguments)
|
protected java.lang.Object |
handleValidationError(java.lang.Object target,
org.springframework.validation.Errors errors)
This method willl set the save() method will set the flush mode to manual. |
protected abstract java.lang.Object |
performInsert(java.lang.Object target,
boolean shouldFlush)
Subclasses should override and perform an insert operation, flushing the session if the second argument is true |
protected abstract java.lang.Object |
performSave(java.lang.Object target,
boolean shouldFlush)
Subclasses should override and perform a save operation, flushing the session if the second argument is true |
protected void |
setErrorsOnInstance(java.lang.Object target,
org.springframework.validation.Errors errors)
Associates the Errors object on the instance |
Methods inherited from class org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod |
---|
getHibernateTemplate, invoke |
Methods inherited from class org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethodInvocation |
---|
getPattern, isMethodMatch, setPattern |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractSavePersistentMethod(java.util.regex.Pattern pattern, org.hibernate.SessionFactory sessionFactory, java.lang.ClassLoader classLoader, GrailsApplication application)
Method Detail |
---|
protected java.lang.Object doInvokeInternal(java.lang.Object target, java.lang.Object[] arguments)
doInvokeInternal
in class AbstractDynamicPersistentMethod
protected java.lang.Object handleValidationError(java.lang.Object target, org.springframework.validation.Errors errors)
target
- The target object that failed validationerrors
- The Errors instance
protected void setErrorsOnInstance(java.lang.Object target, org.springframework.validation.Errors errors)
target
- The target instanceerrors
- The Errors objectprotected abstract java.lang.Object performSave(java.lang.Object target, boolean shouldFlush)
target
- The target object to saveshouldFlush
- Whether to flush
protected abstract java.lang.Object performInsert(java.lang.Object target, boolean shouldFlush)
target
- The target object to saveshouldFlush
- Whether to flush
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |