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_nodes of a structure. The maximum reachable points of an Evaluation_node
is implicitly defined by the maximum reachable points of its child Input_nodes (and child Evaluation_nodes
with other Input_nodes 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_nodes
and changes to POINTS_MAX and SUMMARIZE_POINTS on Evaluation_nodes. If such a change happens, the
POINTS_MAX and AVERAGE_POINTS_MAX of all Evaluation_nodes 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 CollectingEntityListener
CollectingEntityListener.EntityModelNamePredicate, CollectingEntityListener.FieldChangedPredicate, CollectingEntityListener.RelationTouchedPredicate -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class CollectingEntityListener
afterCommit, beforeCommit, contextDestroying, entityChanging, entityCreating, entityDeleting, entityModel, entityRelationChanging, fieldChanged, fieldChanged, 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, withUpdatedEntitiesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CommitListener
afterFlush, priorityMethods inherited from interface EntityFacadeListener
entityReceivedValues, handleSessionOnlyEntity
-
Constructor Details
-
SummarizeMaxPointsEntityListener
-
-
Method Details
-
onBeforeCommit
- Specified by:
onBeforeCommitin classCollectingEntityListener
-