Exemplo n.º 1
0
        public virtual IList <HistoricJobLogDto> queryHistoricJobLogs(HistoricJobLogQueryDto queryDto, int?firstResult, int?maxResults)
        {
            queryDto.ObjectMapper = objectMapper;
            HistoricJobLogQuery query = queryDto.toQuery(processEngine);

            IList <HistoricJobLog> matchingHistoricJobLogs;

            if (firstResult != null || maxResults != null)
            {
                matchingHistoricJobLogs = executePaginatedQuery(query, firstResult, maxResults);
            }
            else
            {
                matchingHistoricJobLogs = query.list();
            }

            IList <HistoricJobLogDto> results = new List <HistoricJobLogDto>();

            foreach (HistoricJobLog historicJobLog in matchingHistoricJobLogs)
            {
                HistoricJobLogDto result = HistoricJobLogDto.fromHistoricJobLog(historicJobLog);
                results.Add(result);
            }

            return(results);
        }
Exemplo n.º 2
0
        public virtual CountResultDto queryHistoricJobLogsCount(HistoricJobLogQueryDto queryDto)
        {
            queryDto.ObjectMapper = objectMapper;
            HistoricJobLogQuery query = queryDto.toQuery(processEngine);

            long           count  = query.count();
            CountResultDto result = new CountResultDto();

            result.Count = count;

            return(result);
        }
Exemplo n.º 3
0
        public virtual CountResultDto getHistoricJobLogsCount(UriInfo uriInfo)
        {
            HistoricJobLogQueryDto queryDto = new HistoricJobLogQueryDto(objectMapper, uriInfo.QueryParameters);

            return(queryHistoricJobLogsCount(queryDto));
        }
Exemplo n.º 4
0
        public virtual IList <HistoricJobLogDto> getHistoricJobLogs(UriInfo uriInfo, int?firstResult, int?maxResults)
        {
            HistoricJobLogQueryDto queryDto = new HistoricJobLogQueryDto(objectMapper, uriInfo.QueryParameters);

            return(queryHistoricJobLogs(queryDto, firstResult, maxResults));
        }