use of org.camunda.bpm.engine.rest.dto.history.HistoricDetailQueryDto in project camunda-bpm-platform by camunda.
the class HistoricDetailRestServiceImpl method getHistoricDetailsCount.
@Override
public CountResultDto getHistoricDetailsCount(UriInfo uriInfo) {
HistoricDetailQueryDto queryDto = new HistoricDetailQueryDto(objectMapper, uriInfo.getQueryParameters());
HistoricDetailQuery query = queryDto.toQuery(processEngine);
long count = query.count();
CountResultDto result = new CountResultDto();
result.setCount(count);
return result;
}
use of org.camunda.bpm.engine.rest.dto.history.HistoricDetailQueryDto in project camunda-bpm-platform by camunda.
the class HistoricDetailRestServiceImpl method getHistoricDetails.
@Override
public List<HistoricDetailDto> getHistoricDetails(UriInfo uriInfo, Integer firstResult, Integer maxResults, boolean deserializeObjectValues) {
HistoricDetailQueryDto queryDto = new HistoricDetailQueryDto(objectMapper, uriInfo.getQueryParameters());
HistoricDetailQuery query = queryDto.toQuery(processEngine);
query.disableBinaryFetching();
if (!deserializeObjectValues) {
query.disableCustomObjectDeserialization();
}
List<HistoricDetail> queryResult;
if (firstResult != null || maxResults != null) {
queryResult = executePaginatedQuery(query, firstResult, maxResults);
} else {
queryResult = query.list();
}
List<HistoricDetailDto> result = new ArrayList<HistoricDetailDto>();
for (HistoricDetail historicDetail : queryResult) {
HistoricDetailDto dto = HistoricDetailDto.fromHistoricDetail(historicDetail);
result.add(dto);
}
return result;
}
Aggregations