Class QualificationEvaluationService

java.lang.Object
ch.tocco.nice2.optional.qualification.impl.services.QualificationEvaluationService

@Component public class QualificationEvaluationService extends Object
  • Constructor Details

  • Method Details

    • runEvaluation

      public void runEvaluation(EntityList evaluations)
      Parameters:
      evaluations - the evaluations to be ran
    • runEvaluationForParticipants

      public void runEvaluationForParticipants(Iterable<Entity> evaluationData)
      Parameters:
      evaluationData - the evaluation data to be evaluated
    • getCheckedAndUpdatedEvaluations

      public List<Entity> getCheckedAndUpdatedEvaluations(EntityList evaluations)
      filters a list of evaluation to only those that can be evaluated
      Parameters:
      evaluations - the evaluations to be filtered
      Returns:
      the evaluations to be ran
    • getOrCreateEvaluationData

      public List<Entity> getOrCreateEvaluationData(Entity evaluation, Condition registrationCondition)
      get existing or create missing Evaluation_data for an Evaluation and some Registrations
      Parameters:
      evaluation - the evaluation to create Evaluation_data under
      registrationCondition - a condition matching any Registration that Evaluation_data should be created for
      Returns:
      the list of Evaluation_data
    • getParentEvaluationsWithoutChildren

      public List<Entity> getParentEvaluationsWithoutChildren(List<Entity> evaluations)
      Checks if the provided list of Evaluation entities also includes their parent. If so, all children of the parent contained in the list get removed as they will be evaluated during evaluation process of their parent anyway. Note: This has to be done as the user may manually select a collection of Evaluations from varying hierarchy level. As evaluation does not take the hierarchy level into concern, children might get evaluated after their parent, leading to results making the parent evaluation look incomplete.
      Parameters:
      evaluations - the list of Evaluations to clean
      Returns:
      the cleaned list of Evaluation entities to evaluate