Package org.hibernate.event.internal
Class DefaultSaveOrUpdateEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- org.hibernate.event.internal.AbstractSaveEventListener<PersistContext>
-
- org.hibernate.event.internal.DefaultSaveOrUpdateEventListener
-
- All Implemented Interfaces:
SaveOrUpdateEventListener
,CallbackRegistryConsumer
- Direct Known Subclasses:
DefaultSaveEventListener
,DefaultUpdateEventListener
@Deprecated(since="6") public class DefaultSaveOrUpdateEventListener extends AbstractSaveEventListener<PersistContext> implements SaveOrUpdateEventListener
Deprecated.sinceSession.saveOrUpdate(java.lang.Object)
is deprecatedDefines the default listener used by Hibernate for handling save-update events.
-
-
Constructor Summary
Constructors Constructor Description DefaultSaveOrUpdateEventListener()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
entityIsDetached(SaveOrUpdateEvent event)
Deprecated.The given save-update event named a detached entity.protected Object
entityIsPersistent(SaveOrUpdateEvent event)
Deprecated.protected Object
entityIsTransient(SaveOrUpdateEvent event)
Deprecated.The given save-update event named a transient entity.protected CascadingAction<PersistContext>
getCascadeAction()
Deprecated.protected Object
getUpdateId(Object entity, EntityPersister persister, Object requestedId, SessionImplementor session)
Deprecated.Determine the id to use for updating.protected boolean
invokeUpdateLifecycle(Object entity, EntityPersister persister, EventSource source)
Deprecated.void
onSaveOrUpdate(SaveOrUpdateEvent event)
Deprecated.Handle the given update event.protected Object
performSaveOrUpdate(SaveOrUpdateEvent event)
Deprecated.protected void
performUpdate(SaveOrUpdateEvent event, Object entity, EntityPersister persister)
Deprecated.protected boolean
reassociateIfUninitializedProxy(Object object, SessionImplementor source)
Deprecated.-
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
-
onSaveOrUpdate
public void onSaveOrUpdate(SaveOrUpdateEvent event)
Deprecated.Handle the given update event.- Specified by:
onSaveOrUpdate
in interfaceSaveOrUpdateEventListener
- Parameters:
event
- The update event to be handled.
-
reassociateIfUninitializedProxy
protected boolean reassociateIfUninitializedProxy(Object object, SessionImplementor source)
Deprecated.
-
performSaveOrUpdate
protected Object performSaveOrUpdate(SaveOrUpdateEvent event)
Deprecated.
-
entityIsPersistent
protected Object entityIsPersistent(SaveOrUpdateEvent event) throws HibernateException
Deprecated.- Throws:
HibernateException
-
entityIsTransient
protected Object entityIsTransient(SaveOrUpdateEvent event)
Deprecated.The given save-update event named a transient entity.Here, we will perform the save processing.
- Parameters:
event
- The save event to be handled.- Returns:
- The entity's identifier after saving.
-
entityIsDetached
protected void entityIsDetached(SaveOrUpdateEvent event)
Deprecated.The given save-update event named a detached entity.Here, we will perform the update processing.
- Parameters:
event
- The update event to be handled.
-
getUpdateId
protected Object getUpdateId(Object entity, EntityPersister persister, Object requestedId, SessionImplementor session)
Deprecated.Determine the id to use for updating.- Parameters:
entity
- The entity.persister
- The entity persisterrequestedId
- The requested identifiersession
- The session- Returns:
- The id.
- Throws:
TransientObjectException
- If the entity is considered transient.
-
performUpdate
protected void performUpdate(SaveOrUpdateEvent event, Object entity, EntityPersister persister) throws HibernateException
Deprecated.- Throws:
HibernateException
-
invokeUpdateLifecycle
protected boolean invokeUpdateLifecycle(Object entity, EntityPersister persister, EventSource source)
Deprecated.
-
getCascadeAction
protected CascadingAction<PersistContext> getCascadeAction()
Deprecated.- Specified by:
getCascadeAction
in classAbstractSaveEventListener<PersistContext>
-
-