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
    • 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
    • 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