Class PaginableWithDelegate<T>

    • Constructor Detail

      • PaginableWithDelegate

        public PaginableWithDelegate​(Paginable<T> delegate)
    • Method Detail

      • getPageSize

        public long getPageSize()
        Description copied from interface: Paginable
        Returns the number of results per page. 0 means no pagination.
        Specified by:
        getPageSize in interface Paginable<T>
      • getMaxPageSize

        public long getMaxPageSize()
        Description copied from interface: Paginable
        Returns the max number of results per page. 0 means no pagination.

        If page size is greater than this maximum value, it will be taken into account instead.

        Specified by:
        getMaxPageSize in interface Paginable<T>
      • getResultsCount

        public long getResultsCount()
        Description copied from interface: Paginable
        Returns the number of result elements if available or a negative value if it is unknown: UNKNOWN_SIZE if it is unknown as query was not done, and since 5.5, UNKNOWN_SIZE_AFTER_QUERY if it is still unknown after query was done.
        Specified by:
        getResultsCount in interface Paginable<T>
      • getNumberOfPages

        public long getNumberOfPages()
        Description copied from interface: Paginable
        Returns the total number of pages or 0 if number of pages is unknown.
        Specified by:
        getNumberOfPages in interface Paginable<T>
      • isNextPageAvailable

        public boolean isNextPageAvailable()
        Description copied from interface: Paginable
        Returns a boolean expressing if there are further pages.
        Specified by:
        isNextPageAvailable in interface Paginable<T>
      • isLastPageAvailable

        public boolean isLastPageAvailable()
        Description copied from interface: Paginable
        Returns a boolean expressing if the last page can be displayed.
        Specified by:
        isLastPageAvailable in interface Paginable<T>
      • isPreviousPageAvailable

        public boolean isPreviousPageAvailable()
        Description copied from interface: Paginable
        Returns a boolean expressing if there is a previous page.
        Specified by:
        isPreviousPageAvailable in interface Paginable<T>
      • getCurrentPageSize

        public long getCurrentPageSize()
        Description copied from interface: Paginable
        Returns the number of elements in current page.
        Specified by:
        getCurrentPageSize in interface Paginable<T>
      • getCurrentPageIndex

        public long getCurrentPageIndex()
        Description copied from interface: Paginable
        Returns the current page index as a zero-based integer.
        Specified by:
        getCurrentPageIndex in interface Paginable<T>
      • isSortable

        public boolean isSortable()
        Description copied from interface: Paginable
        Returns if this provider is sortable.
        Specified by:
        isSortable in interface Paginable<T>
      • getCurrentPageOffset

        public long getCurrentPageOffset()
        Description copied from interface: Paginable
        Returns the offset (starting from 0) of the first element in the current page or UNKNOWN_SIZE.
        Specified by:
        getCurrentPageOffset in interface Paginable<T>
      • getResultsCountLimit

        public long getResultsCountLimit()
        Description copied from interface: Paginable
        Limit of number of results beyond which the page provider may not be able to compute Paginable.getResultsCount() or navigate.

        Requesting results beyond this limit may result in error. When Paginable.getResultsCount() is negative, it means there may be more results than this limit.

        0 means there is no limit.

        Specified by:
        getResultsCountLimit in interface Paginable<T>