Search in sources :

Example 1 with CleanableHistoricDecisionInstanceReportDto

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

the class HistoricDecisionDefinitionRestServiceImpl method getCleanableHistoricDecisionInstanceReportCount.

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

Example 2 with CleanableHistoricDecisionInstanceReportDto

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

the class HistoricDecisionDefinitionRestServiceImpl method getCleanableHistoricDecisionInstanceReport.

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

Aggregations

CleanableHistoricDecisionInstanceReport (org.camunda.bpm.engine.history.CleanableHistoricDecisionInstanceReport)2 CleanableHistoricDecisionInstanceReportDto (org.camunda.bpm.engine.rest.dto.history.CleanableHistoricDecisionInstanceReportDto)2 CleanableHistoricDecisionInstanceReportResult (org.camunda.bpm.engine.history.CleanableHistoricDecisionInstanceReportResult)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1