use of org.sonar.db.measure.PastMeasureQuery in project sonarqube by SonarSource.
the class SearchHistoryAction method searchMeasures.
private List<MeasureDto> searchMeasures(DbSession dbSession, SearchHistoryRequest request, SearchHistoryResult result) {
Date from = parseStartingDateOrDateTime(request.getFrom());
Date to = parseEndingDateOrDateTime(request.getTo());
PastMeasureQuery dbQuery = new PastMeasureQuery(result.getComponent().uuid(), result.getMetrics().stream().map(MetricDto::getId).collect(Collectors.toList()), from == null ? null : from.getTime(), to == null ? null : (to.getTime() + 1_000L));
return dbClient.measureDao().selectPastMeasures(dbSession, dbQuery);
}
Aggregations