use of org.camunda.bpm.engine.rest.dto.history.HistoricJobLogDto in project camunda-bpm-platform by camunda.
the class HistoricJobLogRestServiceImpl method queryHistoricJobLogs.
public List<HistoricJobLogDto> queryHistoricJobLogs(HistoricJobLogQueryDto queryDto, Integer firstResult, Integer maxResults) {
queryDto.setObjectMapper(objectMapper);
HistoricJobLogQuery query = queryDto.toQuery(processEngine);
List<HistoricJobLog> matchingHistoricJobLogs;
if (firstResult != null || maxResults != null) {
matchingHistoricJobLogs = executePaginatedQuery(query, firstResult, maxResults);
} else {
matchingHistoricJobLogs = query.list();
}
List<HistoricJobLogDto> results = new ArrayList<HistoricJobLogDto>();
for (HistoricJobLog historicJobLog : matchingHistoricJobLogs) {
HistoricJobLogDto result = HistoricJobLogDto.fromHistoricJobLog(historicJobLog);
results.add(result);
}
return results;
}
Aggregations