Class ReferenceCodeCreateEntityListener
java.lang.Object
ch.tocco.nice2.persist.core.api.util.CollectingAfterCommitListener
ch.tocco.nice2.optional.finance.impl.entitylistener.ReferenceCodeCreateEntityListener
- All Implemented Interfaces:
ContextListener
,EntityListener
,CommitListener
,EventListener
generates a reference code for a order, when it is created
uses
ReferenceCodeService
AfterCommitListener because it needs the order number, which is generated on commit-
Constructor Summary
ConstructorDescriptionReferenceCodeCreateEntityListener
(Context context, CommandExecutor commandExecutor, ReferenceCodeService referenceCodeService, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptioncustomizeMode
(Mode<E> mode) override this method to customize the mode for task to be executed after the commitprotected AfterCommitTask
Methods inherited from class ch.tocco.nice2.persist.core.api.util.CollectingAfterCommitListener
afterCommit, beforeCommit, contextDestroying, entityCreated, entityDeleted, entityUpdated, handleAfterCommit, setFutureCollector
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.util.CommitListener
afterFlush, priority
Methods inherited from interface ch.tocco.nice2.persist.core.api.ContextListener
transactionStarted
-
Constructor Details
-
ReferenceCodeCreateEntityListener
public ReferenceCodeCreateEntityListener(Context context, CommandExecutor commandExecutor, ReferenceCodeService referenceCodeService, SecurityManager securityManager)
-
-
Method Details
-
customizeMode
Description copied from class:CollectingAfterCommitListener
override this method to customize the mode for task to be executed after the commit- Overrides:
customizeMode
in classCollectingAfterCommitListener
- Parameters:
mode
- mode with default settings for CollectingAfterCommitListeners, make changes
-
getAfterCommitTask
- Specified by:
getAfterCommitTask
in classCollectingAfterCommitListener
-