Class PagerToPageResponseHelper
java.lang.Object
com.atlassian.confluence.dmz.pagination.PagerToPageResponseHelper
in DMZ; see the package-info.java for rationale.
- Since:
- 5.10
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <H,
M> PageResponse<M> createFromPager
(com.atlassian.user.search.page.Pager<H> pager, LimitedRequest limitedRequest, Function<H, M> transformer) Helper to build page responses from atlassian user Pagersstatic <H,
M> PageResponse<M> fromPager
(com.atlassian.user.search.page.Pager<H> pager, LimitedRequest limitedRequest, com.google.common.base.Function<H, M> transfromer) Deprecated.since 7.0.1.
-
Constructor Details
-
PagerToPageResponseHelper
public PagerToPageResponseHelper()
-
-
Method Details
-
fromPager
@Deprecated public static <H,M> PageResponse<M> fromPager(com.atlassian.user.search.page.Pager<H> pager, LimitedRequest limitedRequest, com.google.common.base.Function<H, M> transfromer) throws com.atlassian.user.search.page.PagerExceptionDeprecated.since 7.0.1. UsecreateFromPager(Pager, LimitedRequest, Function)
Helper to build page responses from atlassian user Pagers- Type Parameters:
H
- the type of the source object, generally a hibernate objectM
- the type of the model object to produce- Parameters:
pager
- the atlassian user pager which is the datasourcelimitedRequest
- the page request to fetchtransfromer
- the transforming function to apply to convert from the data in the page to the requested model- Returns:
- a page response fulfilling the request
- Throws:
com.atlassian.user.search.page.PagerException
-
createFromPager
public static <H,M> PageResponse<M> createFromPager(com.atlassian.user.search.page.Pager<H> pager, LimitedRequest limitedRequest, Function<H, M> transformer) throws com.atlassian.user.search.page.PagerExceptionHelper to build page responses from atlassian user Pagers- Type Parameters:
H
- the type of the source object, generally a hibernate objectM
- the type of the model object to produce- Parameters:
pager
- the atlassian user pager which is the datasourcelimitedRequest
- the page request to fetchtransformer
- the transforming function to apply to convert from the data in the page to the requested model- Returns:
- a page response fulfilling the request
- Throws:
com.atlassian.user.search.page.PagerException
- Since:
- 7.0.1
-