Exemple #1
0
        public virtual CountResultDto getHistoricBatchesCount(UriInfo uriInfo)
        {
            HistoricBatchQueryDto queryDto = new HistoricBatchQueryDto(objectMapper, uriInfo.QueryParameters);
            HistoricBatchQuery    query    = queryDto.toQuery(processEngine);

            long count = query.count();

            return(new CountResultDto(count));
        }
Exemple #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") @Override public java.util.List<org.camunda.bpm.engine.rest.dto.history.batch.HistoricBatchDto> getHistoricBatches(javax.ws.rs.core.UriInfo uriInfo, System.Nullable<int> firstResult, System.Nullable<int> maxResults)
        public virtual IList <HistoricBatchDto> getHistoricBatches(UriInfo uriInfo, int?firstResult, int?maxResults)
        {
            HistoricBatchQueryDto queryDto = new HistoricBatchQueryDto(objectMapper, uriInfo.QueryParameters);
            HistoricBatchQuery    query    = queryDto.toQuery(processEngine);

            IList <HistoricBatch> matchingBatches;

            if (firstResult != null || maxResults != null)
            {
                matchingBatches = (IList <HistoricBatch>)executePaginatedQuery(query, firstResult, maxResults);
            }
            else
            {
                matchingBatches = query.list();
            }

            IList <HistoricBatchDto> batchResults = new List <HistoricBatchDto>();

            foreach (HistoricBatch matchingBatch in matchingBatches)
            {
                batchResults.Add(HistoricBatchDto.fromBatch(matchingBatch));
            }
            return(batchResults);
        }