Package org.hibernate.event.internal
Class DefaultPersistEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- 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 Constructor Description DefaultPersistEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
entityIsPersistent(PersistEvent event, PersistContext createCache)
protected void
entityIsTransient(PersistEvent event, PersistContext createCache)
Handle the given create event.protected CascadingAction<PersistContext>
getCascadeAction()
void
onPersist(PersistEvent event)
Handle the given create event.void
onPersist(PersistEvent event, PersistContext createCache)
Handle the given create event.-
Methods inherited from class org.hibernate.event.internal.AbstractSaveEventListener
cascadeAfterSave, cascadeBeforeSave, getMergeMap, injectCallbackRegistry, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, visitCollectionsBeforeSave
-
Methods inherited from class org.hibernate.event.internal.AbstractReassociateEventListener
reassociate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.jpa.event.spi.CallbackRegistryConsumer
injectCallbackRegistry
-
-
-
-
Method Detail
-
getCascadeAction
protected CascadingAction<PersistContext> getCascadeAction()
- Specified by:
getCascadeAction
in classAbstractSaveEventListener<PersistContext>
-
onPersist
public void onPersist(PersistEvent event) throws HibernateException
Handle the given create event.- Specified by:
onPersist
in interfacePersistEventListener
- Parameters:
event
- The create event to be handled.- Throws:
HibernateException
-
onPersist
public void onPersist(PersistEvent event, PersistContext createCache) throws HibernateException
Handle the given create event.- Specified by:
onPersist
in interfacePersistEventListener
- Parameters:
event
- The create event to be handled.- Throws:
HibernateException
-
entityIsPersistent
protected void entityIsPersistent(PersistEvent event, PersistContext createCache)
-
entityIsTransient
protected void entityIsTransient(PersistEvent event, PersistContext createCache)
Handle the given create event.- Parameters:
event
- The save event to be handled.createCache
- The copy cache of entity instance to merge/copy instance.
-
-