Class PagerToPageResponseHelper


  • public class PagerToPageResponseHelper
    extends Object
    Since:
    5.10
    • Constructor Detail

      • PagerToPageResponseHelper

        public PagerToPageResponseHelper()
    • Method Detail

      • 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.PagerException
        Helper to build page responses from atlassian user Pagers
        Type Parameters:
        H - the type of the source object, generally a hibernate object
        M - the type of the model object to produce
        Parameters:
        pager - the atlassian user pager which is the datasource
        limitedRequest - the page request to fetch
        transfromer - 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.PagerException
        Helper to build page responses from atlassian user Pagers
        Type Parameters:
        H - the type of the source object, generally a hibernate object
        M - the type of the model object to produce
        Parameters:
        pager - the atlassian user pager which is the datasource
        limitedRequest - the page request to fetch
        transformer - 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