Package org.hibernate.event.internal
Class EntityCopyAllowedObserver
- java.lang.Object
-
- org.hibernate.event.internal.EntityCopyAllowedObserver
-
- All Implemented Interfaces:
EntityCopyObserver
public final class EntityCopyAllowedObserver extends Object implements EntityCopyObserver
AnEntityCopyObserver
implementation that allows multiple representations of the same persistent entity to be merged.
-
-
Field Summary
Fields Modifier and Type Field Description static EntityCopyObserverFactory
FACTORY_OF_SELF
static String
SHORT_NAME
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Called to clear any data stored in this EntityCopyObserver.void
entityCopyDetected(Object managedEntity, Object mergeEntity1, Object mergeEntity2, EventSource session)
Called when more than one representation of the same persistent entity is being merged.void
topLevelMergeComplete(EventSource session)
Called when the top-level merge operation is complete.
-
-
-
Field Detail
-
SHORT_NAME
public static final String SHORT_NAME
- See Also:
- Constant Field Values
-
FACTORY_OF_SELF
public static final EntityCopyObserverFactory FACTORY_OF_SELF
-
-
Method Detail
-
entityCopyDetected
public void entityCopyDetected(Object managedEntity, Object mergeEntity1, Object mergeEntity2, EventSource session)
Description copied from interface:EntityCopyObserver
Called when more than one representation of the same persistent entity is being merged.- Specified by:
entityCopyDetected
in interfaceEntityCopyObserver
- Parameters:
managedEntity
- The managed entity in the persistence context (the merge result).mergeEntity1
- A managed or detached entity being merged; must be non-null.mergeEntity2
- A different managed or detached entity being merged; must be non-null.session
- The session.
-
clear
public void clear()
Description copied from interface:EntityCopyObserver
Called to clear any data stored in this EntityCopyObserver.- Specified by:
clear
in interfaceEntityCopyObserver
-
topLevelMergeComplete
public void topLevelMergeComplete(EventSource session)
Description copied from interface:EntityCopyObserver
Called when the top-level merge operation is complete.- Specified by:
topLevelMergeComplete
in interfaceEntityCopyObserver
- Parameters:
session
- The session
-
-