use of org.camunda.bpm.engine.rest.dto.batch.BatchStatisticsQueryDto in project camunda-bpm-platform by camunda.
the class BatchRestServiceImpl method getStatistics.
public List<BatchStatisticsDto> getStatistics(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
BatchStatisticsQueryDto queryDto = new BatchStatisticsQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
BatchStatisticsQuery query = queryDto.toQuery(getProcessEngine());
List<BatchStatistics> batchStatisticsList;
if (firstResult != null || maxResults != null) {
batchStatisticsList = executePaginatedStatisticsQuery(query, firstResult, maxResults);
} else {
batchStatisticsList = query.list();
}
List<BatchStatisticsDto> statisticsResults = new ArrayList<BatchStatisticsDto>();
for (BatchStatistics batchStatistics : batchStatisticsList) {
statisticsResults.add(BatchStatisticsDto.fromBatchStatistics(batchStatistics));
}
return statisticsResults;
}
use of org.camunda.bpm.engine.rest.dto.batch.BatchStatisticsQueryDto in project camunda-bpm-platform by camunda.
the class BatchRestServiceImpl method getStatisticsCount.
public CountResultDto getStatisticsCount(UriInfo uriInfo) {
BatchStatisticsQueryDto queryDto = new BatchStatisticsQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
BatchStatisticsQuery query = queryDto.toQuery(getProcessEngine());
long count = query.count();
return new CountResultDto(count);
}
Aggregations