Package evaluation

Class Metric

java.lang.Object
evaluation.Metric

public class Metric extends Object
  • Constructor Details

    • Metric

      public Metric()
  • Method Details

    • getEvaluations

      public static List<MetricEvaluationDTO> getEvaluations(String projectId)
      This method returns the list of the metrics and their last evaluation. The evaluation contains the evaluation date and value.
      Parameters:
      projectId - Identifier of the project.
      Returns:
      List of metric evaluations.
    • getSingleEvaluation

      public static MetricEvaluationDTO getSingleEvaluation(String projectId, String metricId)
      This method returns the last evaluation of the metric passed as a parameter. The evaluation contains the evaluation date and value.
      Parameters:
      projectId - Identifier of the project.
      metricId - Identifier of the metric.
      Returns:
      Metric evaluation.
    • getEvaluations

      public static List<MetricEvaluationDTO> getEvaluations(String projectId, LocalDate from, LocalDate to)
      This method returns the list of the metrics and the evaluations belonging to a specific period defined by the parameters from and to. The evaluation contains the evaluation date and value.
      Parameters:
      projectId - Identifier of the project.
      from - Initial date from the range we are querying.
      to - Final date from the range we are querying.
      Returns:
      List of metric evaluations.
    • getSingleEvaluation

      public static MetricEvaluationDTO getSingleEvaluation(String projectId, String metricId, LocalDate from, LocalDate to)
      This method returns the last evaluation of the metric passed as a parameter. The evaluation contains the evaluation date and value.
      Parameters:
      projectId - Identifier of the project.
      metricId - Identifier of the metric.
      Returns:
      Metric evaluation.
    • setQualityFactorsRelation

      public static com.mongodb.client.result.UpdateResult setQualityFactorsRelation(List<MetricEvaluationDTO> metrics)
      This method updates the value of the quality factors relation for a list of metrics.
      Parameters:
      metrics - DTO with the metric information.