public class DefaultMergeEventListener extends AbstractSaveEventListener implements MergeEventListener
AbstractSaveEventListener.EntityState
Constructor and Description |
---|
DefaultMergeEventListener() |
Modifier and Type | Method and Description |
---|---|
protected void |
cascadeAfterSave(EventSource source,
EntityPersister persister,
Object entity,
Object anything)
Cascade behavior is redefined by this subclass, disable superclass behavior
|
protected void |
cascadeBeforeSave(EventSource source,
EntityPersister persister,
Object entity,
Object anything)
Cascade behavior is redefined by this subclass, disable superclass behavior
|
protected void |
cascadeOnMerge(EventSource source,
EntityPersister persister,
Object entity,
Map copyCache)
Perform any cascades needed as part of this copy event.
|
protected void |
copyValues(EntityPersister persister,
Object entity,
Object target,
SessionImplementor source,
Map copyCache) |
protected void |
copyValues(EntityPersister persister,
Object entity,
Object target,
SessionImplementor source,
Map copyCache,
ForeignKeyDirection foreignKeyDirection) |
protected void |
entityIsDetached(MergeEvent event,
Map copyCache) |
protected void |
entityIsPersistent(MergeEvent event,
Map copyCache) |
protected void |
entityIsTransient(MergeEvent event,
Map copyCache) |
protected Boolean |
getAssumedUnsaved() |
protected CascadingAction |
getCascadeAction() |
protected Map |
getMergeMap(Object anything) |
void |
onMerge(MergeEvent event)
Handle the given merge event.
|
void |
onMerge(MergeEvent event,
Map copiedAlready)
Handle the given merge event.
|
getEntityState, getLoggableName, injectCallbackRegistry, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, visitCollectionsBeforeSave
reassociate
protected Map getMergeMap(Object anything)
getMergeMap
in class AbstractSaveEventListener
public void onMerge(MergeEvent event) throws HibernateException
onMerge
in interface MergeEventListener
event
- The merge event to be handled.HibernateException
public void onMerge(MergeEvent event, Map copiedAlready) throws HibernateException
onMerge
in interface MergeEventListener
event
- The merge event to be handled.HibernateException
protected void entityIsPersistent(MergeEvent event, Map copyCache)
protected void entityIsTransient(MergeEvent event, Map copyCache)
protected void entityIsDetached(MergeEvent event, Map copyCache)
protected void copyValues(EntityPersister persister, Object entity, Object target, SessionImplementor source, Map copyCache)
protected void copyValues(EntityPersister persister, Object entity, Object target, SessionImplementor source, Map copyCache, ForeignKeyDirection foreignKeyDirection)
protected void cascadeOnMerge(EventSource source, EntityPersister persister, Object entity, Map copyCache)
source
- The merge event being processed.persister
- The persister of the entity being copied.entity
- The entity being copied.copyCache
- A cache of already copied instance.protected CascadingAction getCascadeAction()
getCascadeAction
in class AbstractSaveEventListener
protected Boolean getAssumedUnsaved()
getAssumedUnsaved
in class AbstractSaveEventListener
protected void cascadeAfterSave(EventSource source, EntityPersister persister, Object entity, Object anything) throws HibernateException
cascadeAfterSave
in class AbstractSaveEventListener
source
- The session from which the event originated.persister
- The entity's persister instance.entity
- The entity beng saved.anything
- Generally cascade-specific dataHibernateException
protected void cascadeBeforeSave(EventSource source, EntityPersister persister, Object entity, Object anything) throws HibernateException
cascadeBeforeSave
in class AbstractSaveEventListener
source
- The session from whcih the save event originated.persister
- The entity's persister instance.entity
- The entity to be saved.anything
- Generally cascade-specific dataHibernateException
Copyright © 2021 JBoss by Red Hat. All rights reserved.