Package org.hibernate.event.internal
Class DefaultPersistEventListener
java.lang.Object
org.hibernate.event.internal.AbstractSaveEventListener<PersistContext>
org.hibernate.event.internal.DefaultPersistEventListener
- All Implemented Interfaces:
PersistEventListener,CallbackRegistryConsumer
- Direct Known Subclasses:
DefaultPersistOnFlushEventListener
public class DefaultPersistEventListener
extends AbstractSaveEventListener<PersistContext>
implements PersistEventListener, CallbackRegistryConsumer
Defines the default create event listener used by hibernate for creating
transient entities in response to generated create events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidentityIsPersistent(PersistEvent event, PersistContext createCache) protected voidentityIsTransient(PersistEvent event, PersistContext createCache) Handle the given create event.protected CascadingAction<PersistContext>voidonPersist(PersistEvent event) Handle the given create event.voidonPersist(PersistEvent event, PersistContext createCache) Handle the given create event.Methods inherited from class org.hibernate.event.internal.AbstractSaveEventListener
cascadeAfterSave, cascadeBeforeSave, getMergeMap, injectCallbackRegistry, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, visitCollectionsBeforeSaveMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.jpa.event.spi.CallbackRegistryConsumer
injectCallbackRegistry
-
Constructor Details
-
DefaultPersistEventListener
public DefaultPersistEventListener()
-
-
Method Details
-
getCascadeAction
- Specified by:
getCascadeActionin classAbstractSaveEventListener<PersistContext>
-
onPersist
Handle the given create event.- Specified by:
onPersistin interfacePersistEventListener- Parameters:
event- The create event to be handled.- Throws:
HibernateException
-
onPersist
Handle the given create event.- Specified by:
onPersistin interfacePersistEventListener- Parameters:
event- The create event to be handled.- Throws:
HibernateException
-
entityIsPersistent
-
entityIsTransient
Handle the given create event.- Parameters:
event- The save event to be handled.createCache- The copy cache of entity instance to merge/copy instance.
-