Package org.flowable.common.rest.api
Interface PaginateListUtil
public interface PaginateListUtil
A util class that can be used to perform easy pagination (with defaults provided by Flowable).
- Author:
- Filip Hrisafov
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <RES,
REQ> DataResponse<RES> paginateList
(Map<String, String> requestParams, Query<?, REQ> query, String defaultSort, Map<String, QueryProperty> properties, ListProcessor<REQ, RES> listProcessor) Uses the pagination parameters from the request and makes sure to order the result and set all pagination attributes for the response to render.static <RES,
REQ> DataResponse<RES> paginateList
(Map<String, String> requestParams, PaginateRequest paginateRequest, Query<?, REQ> query, String defaultSort, Map<String, QueryProperty> properties, ListProcessor<REQ, RES> listProcessor) Uses the pagination parameters form the request and makes sure to order the result and set all pagination attributes for the response to render.static <RES,
REQ> DataResponse<RES> paginateList
(PaginateRequest paginateRequest, Query<?, REQ> query, String defaultSort, Map<String, QueryProperty> properties, ListProcessor<REQ, RES> listProcessor) Uses the pagination attributes perform the querying and render the response.
-
Method Details
-
paginateList
static <RES,REQ> DataResponse<RES> paginateList(Map<String, String> requestParams, Query<?, REQ> query, String defaultSort, Map<String, QueryProperty> properties, ListProcessor<REQ, RES> listProcessor) Uses the pagination parameters from the request and makes sure to order the result and set all pagination attributes for the response to render.- Type Parameters:
REQ
- The type returned by thequery
RES
- The type of the response- Parameters:
requestParams
- The request containing the pagination parametersquery
- The query to get the paged list fromdefaultSort
- The default sort column (the rest attribute) that later will be mapped to an internal engine nameproperties
- The sort propertieslistProcessor
- The processor that would convert the result elements of the query into the response elements
-
paginateList
static <RES,REQ> DataResponse<RES> paginateList(Map<String, String> requestParams, PaginateRequest paginateRequest, Query<?, REQ> query, String defaultSort, Map<String, QueryProperty> properties, ListProcessor<REQ, RES> listProcessor) Uses the pagination parameters form the request and makes sure to order the result and set all pagination attributes for the response to render.- Type Parameters:
REQ
- The type returned by thequery
RES
- The type of the response- Parameters:
requestParams
- The request containing the pagination parameterspaginateRequest
- The paginated request that can be used to get the parameters fromquery
- The query to get the paged list fromdefaultSort
- The default sort column (the rest attribute) that later will be mapped to an internal engine nameproperties
- The sort propertieslistProcessor
- The processor that would convert the result elements of the query into the response elements
-
paginateList
static <RES,REQ> DataResponse<RES> paginateList(PaginateRequest paginateRequest, Query<?, REQ> query, String defaultSort, Map<String, QueryProperty> properties, ListProcessor<REQ, RES> listProcessor) Uses the pagination attributes perform the querying and render the response.- Type Parameters:
REQ
- The type returned by thequery
RES
- The type of the response- Parameters:
paginateRequest
- The paginated request that is used to get the pagination parameters fromquery
- The query to get the paged list fromdefaultSort
- The default sort column (the rest attribute) that later will be mapped to an internal engine nameproperties
- The sort propertieslistProcessor
- The processor that would convert the result elements of the query into the response elements
-