Package evaluation
Class Factor
java.lang.Object
evaluation.Factor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<FactorEvaluationDTO>getEvaluations(String projectId) This method returns the list of the factors and the last evaluation.static List<FactorEvaluationDTO>getEvaluations(String projectId, LocalDate from, LocalDate to) This method returns the list of the factors and the evaluations belonging to a specific period defined by the parameters from and to.static StringThe external repository have two identifiers for each element, the field used by the repository (hard ID) and the id and evaluation date used by the "users".static List<FactorMetricEvaluationDTO>getMetricsEvaluations(String projectId) This method returns the list of the factors, for each factor it returns the list of metrics associated to this factor and the last metric evaluation.static FactorMetricEvaluationDTOgetMetricsEvaluations(String projectId, String factorID) This method returns the list of metrics associated to the factor evaluation passed as parameter and the last metric evaluation.static FactorMetricEvaluationDTOgetMetricsEvaluations(String projectId, String factorID, LocalDate from, LocalDate to) This method returns the list of metrics associated to the factor evaluation passed as parameter.static List<FactorMetricEvaluationDTO>getMetricsEvaluations(String projectId, LocalDate from, LocalDate to) This method returns the list of the factors, for each factor it returns the list of metrics associated to this factor.static FactorEvaluationDTOgetSingleEvaluation(String projectId, String factorId) This method returns the last evaluation of the factor passed as a parameter.static voidReset the map which stores the factors' identifiers and names.static com.mongodb.client.result.UpdateResultsetFactorEvaluation(String projectId, String factorID, String factorName, String factorDescription, Float value, String info, LocalDate evaluationDate, EstimationEvaluationDTO estimation, List<String> missingMetrics, long datesMismatch, List<String> indicators) This method updates the value of an quality factors in a given date, if it doesn't exist a new quality factor is created with the given data.static com.mongodb.client.result.UpdateResultThis method updates the value of the strategic indicators' relation for a list of factor.
-
Constructor Details
-
Factor
public Factor()
-
-
Method Details
-
getEvaluations
This method returns the list of the factors and the last evaluation. The evaluation contains the evaluation date and value.- Parameters:
projectId- Identifier of the project.- Returns:
- The list of factors evaluation.
-
getSingleEvaluation
This method returns the last evaluation of the factor passed as a parameter. The evaluation contains the evaluation date and value.- Parameters:
projectId- Identifier of the project.factorId- Identifier of the factor.- Returns:
- Factor evaluation.
-
getEvaluations
public static List<FactorEvaluationDTO> getEvaluations(String projectId, LocalDate from, LocalDate to) This method returns the list of the factors 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:
- The list of factors evaluations.
-
getHardID
The external repository have two identifiers for each element, the field used by the repository (hard ID) and the id and evaluation date used by the "users".- Parameters:
projectId- Identifier of the project.qualityFactorID- Identifier of the quality factor.evaluationDate- Date when the evaluation has been computed.- Returns:
- The hard ID of the factor.
-
setFactorEvaluation
public static com.mongodb.client.result.UpdateResult setFactorEvaluation(String projectId, String factorID, String factorName, String factorDescription, Float value, String info, LocalDate evaluationDate, EstimationEvaluationDTO estimation, List<String> missingMetrics, long datesMismatch, List<String> indicators) This method updates the value of an quality factors in a given date, if it doesn't exist a new quality factor is created with the given data.- Parameters:
projectId- Identifier of the project.factorID- Identifier of the quality factor.factorName- Name of the quality factor.factorDescription- Description of the quality factor.value- Evaluation value.evaluationDate- Date when the evaluation has been computed.estimation- In case we have an estimation (probabilities and probable values), instead of a single value.
-
setStrategicIndicatorRelation
public static com.mongodb.client.result.UpdateResult setStrategicIndicatorRelation(List<FactorEvaluationDTO> factors) This method updates the value of the strategic indicators' relation for a list of factor.- Parameters:
factors- DTO with the factor information.
-
getMetricsEvaluations
This method returns the list of the factors, for each factor it returns the list of metrics associated to this factor and the last metric evaluation. The evaluation contains the evaluation date and value.- Parameters:
projectId- Identifier of the project.- Returns:
- The list of factors' evaluations, for each factor it contains the list of the evaluation of the metrics used to compute the factor.
-
getMetricsEvaluations
public static List<FactorMetricEvaluationDTO> getMetricsEvaluations(String projectId, LocalDate from, LocalDate to) This method returns the list of the factors, for each factor it returns the list of metrics associated to this factor. For each metric, it returns the evaluations belonging to the 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:
- The list of factors' evaluations, for each factor it contains the list of the evaluation of the metrics used to compute the factor.
-
getMetricsEvaluations
This method returns the list of metrics associated to the factor evaluation passed as parameter and the last metric evaluation. The evaluation contains the evaluation date and value.- Parameters:
projectId- Identifier of the project.factorID- Identifier of the factor.- Returns:
- The list of factors' evaluations, for each factor it contains the list of the evaluation of the metrics used to compute the factor.
-
getMetricsEvaluations
public static FactorMetricEvaluationDTO getMetricsEvaluations(String projectId, String factorID, LocalDate from, LocalDate to) This method returns the list of metrics associated to the factor evaluation passed as parameter. For each metric, it returns the evaluations belonging to the period defined by the parameters from and to. The evaluation contains the evaluation date and value.- Parameters:
projectId- Identifier of the projectId.factorID- Identifier of the factor.from- Initial date from the range we are querying.to- Final date from the range we are querying.- Returns:
- The list of factors' evaluations, for each factor it contains the list of the evaluation of the metrics used to compute the factor.
-
resetFactorsIDNames
public static void resetFactorsIDNames()Reset the map which stores the factors' identifiers and names.
-