Search in sources :

Example 1 with CleanableHistoricBatchReportDto

use of org.camunda.bpm.engine.rest.dto.history.batch.CleanableHistoricBatchReportDto in project camunda-bpm-platform by camunda.

the class HistoricBatchRestServiceImpl method getCleanableHistoricBatchesReportCount.

@Override
public CountResultDto getCleanableHistoricBatchesReportCount(UriInfo uriInfo) {
    CleanableHistoricBatchReportDto queryDto = new CleanableHistoricBatchReportDto(objectMapper, uriInfo.getQueryParameters());
    queryDto.setObjectMapper(objectMapper);
    CleanableHistoricBatchReport query = queryDto.toQuery(processEngine);
    long count = query.count();
    CountResultDto result = new CountResultDto();
    result.setCount(count);
    return result;
}
Also used : CleanableHistoricBatchReportDto(org.camunda.bpm.engine.rest.dto.history.batch.CleanableHistoricBatchReportDto) CountResultDto(org.camunda.bpm.engine.rest.dto.CountResultDto) CleanableHistoricBatchReport(org.camunda.bpm.engine.history.CleanableHistoricBatchReport)

Example 2 with CleanableHistoricBatchReportDto

use of org.camunda.bpm.engine.rest.dto.history.batch.CleanableHistoricBatchReportDto in project camunda-bpm-platform by camunda.

the class HistoricBatchRestServiceImpl method getCleanableHistoricBatchesReport.

@SuppressWarnings("unchecked")
@Override
public List<CleanableHistoricBatchReportResultDto> getCleanableHistoricBatchesReport(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
    CleanableHistoricBatchReportDto queryDto = new CleanableHistoricBatchReportDto(objectMapper, uriInfo.getQueryParameters());
    CleanableHistoricBatchReport query = queryDto.toQuery(processEngine);
    List<CleanableHistoricBatchReportResult> reportResult;
    if (firstResult != null || maxResults != null) {
        reportResult = (List<CleanableHistoricBatchReportResult>) executePaginatedQuery(query, firstResult, maxResults);
    } else {
        reportResult = query.list();
    }
    return CleanableHistoricBatchReportResultDto.convert(reportResult);
}
Also used : CleanableHistoricBatchReportDto(org.camunda.bpm.engine.rest.dto.history.batch.CleanableHistoricBatchReportDto) CleanableHistoricBatchReportResult(org.camunda.bpm.engine.history.CleanableHistoricBatchReportResult) CleanableHistoricBatchReport(org.camunda.bpm.engine.history.CleanableHistoricBatchReport)

Aggregations

CleanableHistoricBatchReport (org.camunda.bpm.engine.history.CleanableHistoricBatchReport)2 CleanableHistoricBatchReportDto (org.camunda.bpm.engine.rest.dto.history.batch.CleanableHistoricBatchReportDto)2 CleanableHistoricBatchReportResult (org.camunda.bpm.engine.history.CleanableHistoricBatchReportResult)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1