org.codehaus.groovy.grails.orm.hibernate.metaclass
Class MergePersistentMethod
java.lang.Object
org.codehaus.groovy.grails.commons.metaclass.AbstractDynamicMethodInvocation
org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractDynamicPersistentMethod
org.codehaus.groovy.grails.orm.hibernate.metaclass.AbstractSavePersistentMethod
org.codehaus.groovy.grails.orm.hibernate.metaclass.MergePersistentMethod
- All Implemented Interfaces:
- DynamicMethodInvocation
public class MergePersistentMethod
- extends AbstractSavePersistentMethod
The merge() method follows the semantics of merge which attempts to "merge" an object
with a long lived session
- Since:
- 0.3
- Author:
- Graeme Rocher
Method Summary |
protected Object |
performInsert(Object target,
boolean shouldFlush)
Subclasses should override and perform an insert operation, flushing the session if the second argument is true |
protected Object |
performSave(Object target,
boolean flush)
Subclasses should override and perform a save operation, flushing the session if the second argument is true |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
METHOD_SIGNATURE
public static final String METHOD_SIGNATURE
- See Also:
- Constant Field Values
METHOD_PATTERN
public static final Pattern METHOD_PATTERN
MergePersistentMethod
public MergePersistentMethod(org.hibernate.SessionFactory sessionFactory,
ClassLoader classLoader,
GrailsApplication application)
MergePersistentMethod
public MergePersistentMethod(org.hibernate.SessionFactory sessionFactory,
ClassLoader classLoader,
GrailsApplication application,
GrailsDomainClass dc)
performSave
protected Object performSave(Object target,
boolean flush)
- Description copied from class:
AbstractSavePersistentMethod
- Subclasses should override and perform a save operation, flushing the session if the second argument is true
- Specified by:
performSave
in class AbstractSavePersistentMethod
- Parameters:
target
- The target object to saveflush
- Whether to flush
- Returns:
- The target object
performInsert
protected Object performInsert(Object target,
boolean shouldFlush)
- Description copied from class:
AbstractSavePersistentMethod
- Subclasses should override and perform an insert operation, flushing the session if the second argument is true
- Specified by:
performInsert
in class AbstractSavePersistentMethod
- Parameters:
target
- The target object to saveshouldFlush
- Whether to flush
- Returns:
- The target object
Copyright (c) 2005-2009 The Grails project