Class PromotionDataRegistrationListener
java.lang.Object
ch.tocco.nice2.persist.core.api.util.CollectingAfterFlushEntityListener<PromotionDataRegistrationListener.PromotionDataContext>
ch.tocco.nice2.optional.qualification.impl.entitylistener.PromotionDataRegistrationListener
- All Implemented Interfaces:
EntityFacadeListener
,CommitListener
,EventListener
public class PromotionDataRegistrationListener
extends CollectingAfterFlushEntityListener<PromotionDataRegistrationListener.PromotionDataContext>
when the attempts or promotion status on an Evaluation_data or Input_data entity are changed, gather all attempts
and promotion status for its user from entities connected to the same Event, and write those from the highest attempt
to the Registration of the User
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Nested classes/interfaces inherited from class ch.tocco.nice2.persist.core.api.util.CollectingAfterFlushEntityListener
CollectingAfterFlushEntityListener.EntityContext
-
Constructor Summary
ConstructorsConstructorDescriptionPromotionDataRegistrationListener
(QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, PersistenceService persistenceService) -
Method Summary
Modifier and TypeMethodDescriptionboolean
protected void
protected void
protected void
int
priority()
Defines execution order of allCollectingAfterFlushEntityListener
.Methods inherited from class ch.tocco.nice2.persist.core.api.util.CollectingAfterFlushEntityListener
afterCommit, afterFlush, beforeCommit, entityChanging, entityCreating, entityDeleting, entityRelationChanging, getEntityContext, onEntityCreating
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
-
PromotionDataRegistrationListener
public PromotionDataRegistrationListener(QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, PersistenceService persistenceService)
-
-
Method Details
-
onEntityDeleting
-
onEntityChanging
-
onEntityRelationChanging
-
onAfterFlush
- Specified by:
onAfterFlush
in classCollectingAfterFlushEntityListener<PromotionDataRegistrationListener.PromotionDataContext>
- 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<PromotionDataRegistrationListener.PromotionDataContext>
-
createEntityContext
-