Class SummarizeMaxPointsEntityListener
java.lang.Object
ch.tocco.nice2.persist.core.api.util.CollectingEntityListener
ch.tocco.nice2.optional.qualification.impl.entitylistener.SummarizeMaxPointsEntityListener
- All Implemented Interfaces:
ContextListener
,EntityFacadeListener
,CommitListener
,EventListener
When using the
Input_type
"points" or "points_average", the amount of points reachable in a course is defined by
the various Input_node
s of a structure. The maximum reachable points of an Evaluation_node
is implicitly defined by the maximum reachable points of its child Input_node
s (and child Evaluation_node
s
with other Input_node
s below it). Thus, changing one Input_node
's MAX_POINTS
value affects
all parent nodes respectively bottom-up.
This listener listens for changes to POINTS_MAX
, SUMMARIZE_POINTS
and relInput_type
on Input_node
s
and changes to POINTS_MAX
and SUMMARIZE_POINTS
on Evaluation_node
s. If such a change happens, the
POINTS_MAX
and AVERAGE_POINTS_MAX
of all Evaluation_node
s and their parents related to that Input_node
get their
POINTS_MAX
value recalculated according to the change.-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.persist.core.api.util.CollectingEntityListener
CollectingEntityListener.EntityModelNamePredicate, CollectingEntityListener.FieldTouchedPredicate, CollectingEntityListener.RelationTouchedPredicate
-
Constructor Summary
-
Method Summary
Methods inherited from class ch.tocco.nice2.persist.core.api.util.CollectingEntityListener
afterCommit, beforeCommit, contextDestroying, entityChanging, entityCreating, entityDeleting, entityModel, entityRelationChanging, fieldTouched, fieldTouched, getAddedRelationChanges, getAddedRelationChangesFor, getAffectedEntities, getAffectedEntities, getAllAffectedEntities, getAllAffectedEntities, getAllRelationChanges, getCreatedEntities, getCreatedEntities, getDeletedEntities, getDeletedEntities, getKey, getOldValues, getRelationChanges, getRelationChangesFor, getRelationChangesFor, getRemovedRelationChanges, getRemovedRelationChangesFor, getUpdatedEntities, getUpdatedEntities, isValidTx, onEntityChanging, onEntityCreating, onEntityDeleting, onEntityRelationChanging, relationTouched, relationTouched, transactionStarted, withAffectedEntities, withAffectedEntities, withAllAffectedEntities, withAllAffectedEntities, withCreatedEntities, withCreatedEntities, withDeletedEntities, withDeletedEntities, withUpdatedEntities, withUpdatedEntities
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.entity.events.EntityFacadeListener
entityReceivedValues, handleSessionOnlyEntity
-
Constructor Details
-
SummarizeMaxPointsEntityListener
-
-
Method Details
-
onBeforeCommit
- Specified by:
onBeforeCommit
in classCollectingEntityListener
-