Class EntityCopyAllowedLoggedObserver

  • All Implemented Interfaces:
    EntityCopyObserver

    public final class EntityCopyAllowedLoggedObserver
    extends Object
    implements EntityCopyObserver
    An EntityCopyObserver implementation that allows multiple representations of the same persistent entity to be merged and provides logging of the entity copies that are detected.
    • 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 interface EntityCopyObserver
        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.