Search in sources :

Example 1 with HistoricJobLogDto

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;
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery) HistoricJobLog(org.camunda.bpm.engine.history.HistoricJobLog) ArrayList(java.util.ArrayList) HistoricJobLogDto(org.camunda.bpm.engine.rest.dto.history.HistoricJobLogDto)

Aggregations

ArrayList (java.util.ArrayList)1 HistoricJobLog (org.camunda.bpm.engine.history.HistoricJobLog)1 HistoricJobLogQuery (org.camunda.bpm.engine.history.HistoricJobLogQuery)1 HistoricJobLogDto (org.camunda.bpm.engine.rest.dto.history.HistoricJobLogDto)1