Class AbstractPageableView<T>

    • Field Detail

      • UNKNOWN_COUNT

        public static final long UNKNOWN_COUNT
        Constant for unknown count of rows.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractPageableView

        public AbstractPageableView​(String id,
                                    IModel<T> model)
        Constructor,
        Parameters:
        id -
        model -
      • AbstractPageableView

        public AbstractPageableView​(String id)
        Constructor.
        Parameters:
        id -
    • Method Detail

      • getTotalRowCount

        public long getTotalRowCount()
        Returns the total count of items (sum of count of items on all pages) or UNKNOWN_COUNT in case the count can't be determined.
        Returns:
        total count of items or -1L
      • getCurrentPageItemCount

        public int getCurrentPageItemCount()
        Returns the count of items on current page.
        Returns:
        count of items on current page
      • getCurrentPage

        public long getCurrentPage()
        Specified by:
        getCurrentPage in interface IPageable
        Returns:
        The current page that is or will be rendered.
      • getPageCount

        public long getPageCount()
        Gets the total number of pages this pageable object has.
        Specified by:
        getPageCount in interface IPageable
        Returns:
        The total number of pages this pageable object has
      • setCurrentPage

        public void setCurrentPage​(long page)
        Sets the a page that should be rendered.
        Specified by:
        setCurrentPage in interface IPageable
        Parameters:
        page - The page that should be rendered.
      • setMaxFirstItemReached

        public void setMaxFirstItemReached​(long maxFirstItemReached)
        You should never need this method unless your pagingNavigator uses pageParametres and dataSource is with unknown item count
        Parameters:
        maxFirstItemReached -
      • clearCache

        public void clearCache()
        clears the queryResult so the next use will be forced to re-initialize
      • getDataSource

        protected abstract IDataSource<T> getDataSource()
      • getRowsPerPage

        protected abstract long getRowsPerPage()