Search in sources :

Example 1 with CleanableHistoricCaseInstanceReportDto

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

the class HistoricCaseDefinitionRestServiceImpl method getCleanableHistoricCaseInstanceReport.

@Override
public List<CleanableHistoricCaseInstanceReportResultDto> getCleanableHistoricCaseInstanceReport(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
    CleanableHistoricCaseInstanceReportDto queryDto = new CleanableHistoricCaseInstanceReportDto(objectMapper, uriInfo.getQueryParameters());
    CleanableHistoricCaseInstanceReport query = queryDto.toQuery(processEngine);
    List<CleanableHistoricCaseInstanceReportResult> reportResult;
    if (firstResult != null || maxResults != null) {
        reportResult = executePaginatedQuery(query, firstResult, maxResults);
    } else {
        reportResult = query.list();
    }
    return CleanableHistoricCaseInstanceReportResultDto.convert(reportResult);
}
Also used : CleanableHistoricCaseInstanceReportDto(org.camunda.bpm.engine.rest.dto.history.CleanableHistoricCaseInstanceReportDto) CleanableHistoricCaseInstanceReportResult(org.camunda.bpm.engine.history.CleanableHistoricCaseInstanceReportResult) CleanableHistoricCaseInstanceReport(org.camunda.bpm.engine.history.CleanableHistoricCaseInstanceReport)

Example 2 with CleanableHistoricCaseInstanceReportDto

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

the class HistoricCaseDefinitionRestServiceImpl method getCleanableHistoricCaseInstanceReportCount.

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

Aggregations

CleanableHistoricCaseInstanceReport (org.camunda.bpm.engine.history.CleanableHistoricCaseInstanceReport)2 CleanableHistoricCaseInstanceReportDto (org.camunda.bpm.engine.rest.dto.history.CleanableHistoricCaseInstanceReportDto)2 CleanableHistoricCaseInstanceReportResult (org.camunda.bpm.engine.history.CleanableHistoricCaseInstanceReportResult)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1