Class DuplicatesMergeListener
java.lang.Object
ch.tocco.nice2.persist.core.api.util.CollectingAfterFlushEntityListener<CollectingAfterFlushEntityListener.EntityContext>
ch.tocco.nice2.duplicate.impl.search.DuplicatesMergeListener
- All Implemented Interfaces:
EntityFacadeListener
,CommitListener
,EventListener
public class DuplicatesMergeListener
extends CollectingAfterFlushEntityListener<CollectingAfterFlushEntityListener.EntityContext>
Is executed after the
DuplicateListener
and checks whether
multiple duplicate entities should be merged into one.
This is an unusual situation that may arise after modifying multiple entities.-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.persist.core.api.util.CollectingAfterFlushEntityListener
CollectingAfterFlushEntityListener.EntityContext
-
Constructor Summary
ConstructorDescriptionDuplicatesMergeListener
(DataModel dataModel, BusinessUnitManager businessUnitManager, DuplicateSearchService duplicateSearchService, DefaultDisplayService defaultDisplayService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
priority()
Defines execution order of allCollectingAfterFlushEntityListener
.Methods inherited from class ch.tocco.nice2.persist.core.api.util.CollectingAfterFlushEntityListener
afterCommit, afterFlush, beforeCommit, createEntityContext, entityChanging, entityCreating, entityDeleting, entityRelationChanging, getEntityContext, onEntityChanging, onEntityCreating, onEntityDeleting, onEntityRelationChanging
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.entity.events.EntityFacadeListener
entityReceivedValues, handleSessionOnlyEntity
-
Constructor Details
-
DuplicatesMergeListener
public DuplicatesMergeListener(DataModel dataModel, BusinessUnitManager businessUnitManager, DuplicateSearchService duplicateSearchService, DefaultDisplayService defaultDisplayService)
-
-
Method Details
-
onAfterFlush
- Specified by:
onAfterFlush
in classCollectingAfterFlushEntityListener<CollectingAfterFlushEntityListener.EntityContext>
- Returns:
- true if this listeners has made any changes to the database
-
priority
public int priority()Description copied from class:CollectingAfterFlushEntityListener
Defines execution order of allCollectingAfterFlushEntityListener
. It is important to make sure that other listeners are not affected.- Specified by:
priority
in interfaceCommitListener
- Specified by:
priority
in classCollectingAfterFlushEntityListener<CollectingAfterFlushEntityListener.EntityContext>
-