Package org.hibernate.event.internal
Class DefaultSaveEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- org.hibernate.event.internal.AbstractSaveEventListener<PersistContext>
-
- org.hibernate.event.internal.DefaultSaveOrUpdateEventListener
-
- org.hibernate.event.internal.DefaultSaveEventListener
-
- All Implemented Interfaces:
SaveOrUpdateEventListener
,CallbackRegistryConsumer
public class DefaultSaveEventListener extends DefaultSaveOrUpdateEventListener
An event handler for save() events
-
-
Constructor Summary
Constructors Constructor Description DefaultSaveEventListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
performSaveOrUpdate(SaveOrUpdateEvent event)
protected boolean
reassociateIfUninitializedProxy(Object object, SessionImplementor source)
protected Object
saveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
Save the transient instance, assigning the right identifier-
Methods inherited from class org.hibernate.event.internal.DefaultSaveOrUpdateEventListener
entityIsDetached, entityIsPersistent, entityIsTransient, getCascadeAction, getUpdateId, invokeUpdateLifecycle, onSaveOrUpdate, performUpdate
-
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
-
-
-
-
Method Detail
-
performSaveOrUpdate
protected Object performSaveOrUpdate(SaveOrUpdateEvent event)
- Overrides:
performSaveOrUpdate
in classDefaultSaveOrUpdateEventListener
-
saveWithGeneratedOrRequestedId
protected Object saveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
Description copied from class:DefaultSaveOrUpdateEventListener
Save the transient instance, assigning the right identifier- Overrides:
saveWithGeneratedOrRequestedId
in classDefaultSaveOrUpdateEventListener
- Parameters:
event
- The initiating event.- Returns:
- The entity's identifier value after saving.
-
reassociateIfUninitializedProxy
protected boolean reassociateIfUninitializedProxy(Object object, SessionImplementor source)
- Overrides:
reassociateIfUninitializedProxy
in classDefaultSaveOrUpdateEventListener
-
-