Search in sources :

Example 1 with PastMeasureQuery

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);
}
Also used : MetricDto(org.sonar.db.metric.MetricDto) PastMeasureQuery(org.sonar.db.measure.PastMeasureQuery) Date(java.util.Date)

Aggregations

Date (java.util.Date)1 PastMeasureQuery (org.sonar.db.measure.PastMeasureQuery)1 MetricDto (org.sonar.db.metric.MetricDto)1