|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.event.def.AbstractReassociateEventListener org.hibernate.event.def.AbstractSaveEventListener org.hibernate.event.def.DefaultMergeEventListener
public class DefaultMergeEventListener
Defines the default copy event listener used by hibernate for copying entities in response to generated copy events.
Field Summary |
---|
Fields inherited from class org.hibernate.event.def.AbstractSaveEventListener |
---|
DELETED, DETACHED, PERSISTENT, TRANSIENT |
Constructor Summary | |
---|---|
DefaultMergeEventListener()
|
Method Summary | |
---|---|
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)
|
protected org.hibernate.event.def.EventCache |
getTransientCopyCache(MergeEvent event,
org.hibernate.event.def.EventCache copyCache)
|
protected Object |
mergeTransientEntity(Object entity,
String entityName,
Serializable requestedId,
EventSource source,
Map copyCache)
|
void |
onMerge(MergeEvent event)
Handle the given merge event. |
void |
onMerge(MergeEvent event,
Map copiedAlready)
Handle the given merge event. |
protected void |
retryMergeTransientEntities(MergeEvent event,
Map transientCopyCache,
org.hibernate.event.def.EventCache copyCache,
boolean isNullabilityChecked)
|
Methods inherited from class org.hibernate.event.def.AbstractSaveEventListener |
---|
getEntityState, getLoggableName, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, validate, visitCollectionsBeforeSave |
Methods inherited from class org.hibernate.event.def.AbstractReassociateEventListener |
---|
reassociate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultMergeEventListener()
Method Detail |
---|
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
protected org.hibernate.event.def.EventCache getTransientCopyCache(MergeEvent event, org.hibernate.event.def.EventCache copyCache)
protected void retryMergeTransientEntities(MergeEvent event, Map transientCopyCache, org.hibernate.event.def.EventCache copyCache, boolean isNullabilityChecked)
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 Object mergeTransientEntity(Object entity, String entityName, Serializable requestedId, EventSource source, 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 data
HibernateException
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 data
HibernateException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |