Interface DataPager

All Known Implementing Classes:
DataBasePager

public interface DataPager
This interface defines methods for managing paging in a dataset.

It allow retrieval of information about the current page, navigation between pages, and setting the number of rows per page.

Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    This method gets the total number of rows in the data set.
    int
    This method gets the current page number.
    int
    This method gets the number of rows displayed on the current page.
    int
    This method gets the total number of pages in the data set.
    void
    This method moves to the first page in the data set.
    void
    This method moves to the last page in the data set.
    void
    This method moves to the next page in the data set.
    void
    moveToPage(int page)
    This method moves to a specific page in the data set.
    void
    This method moves to the previous page in the data set.
    void
    setPageRowsCount(int pageRowsCount)
    This method sets the number of rows to be displayed on each page.
  • Method Details

    • getAllRowsCount

      int getAllRowsCount() throws PagingException
      This method gets the total number of rows in the data set.
      Returns:
      the total number of rows in the data set.
      Throws:
      PagingException - if an error occurs while retrieving the row count.
    • getCurrentPage

      int getCurrentPage() throws PagingException
      This method gets the current page number.
      Returns:
      the current page number.
      Throws:
      PagingException - if an error occurs while retrieving the current page number.
    • getPageRowsCount

      int getPageRowsCount() throws PagingException
      This method gets the number of rows displayed on the current page.
      Returns:
      the number of rows on the current page.
      Throws:
      PagingException - if an error occurs while retrieving the page rows count.
    • getPagesCount

      int getPagesCount() throws PagingException
      This method gets the total number of pages in the data set.
      Returns:
      the total number of pages.
      Throws:
      PagingException - if an error occurs while calculating the pages count.
    • moveToFirstPage

      void moveToFirstPage() throws PagingException
      This method moves to the first page in the data set.
      Throws:
      PagingException - if an error occurs while navigating to the first page.
    • moveToLastPage

      void moveToLastPage() throws PagingException
      This method moves to the last page in the data set.
      Throws:
      PagingException - if an error occurs while navigating to the last page.
    • moveToNextPage

      void moveToNextPage() throws PagingException
      This method moves to the next page in the data set.
      Throws:
      PagingException - if an error occurs while navigating to the next page.
    • moveToPage

      void moveToPage(int page) throws PagingException
      This method moves to a specific page in the data set.
      Parameters:
      page - Specifies the page number to move to.
      Throws:
      PagingException - if an error occurs while navigating to the specified page.
    • moveToPreviousePage

      void moveToPreviousePage() throws PagingException
      This method moves to the previous page in the data set.
      Throws:
      PagingException - if an error occurs while navigating to the previous page.
    • setPageRowsCount

      void setPageRowsCount(int pageRowsCount) throws PagingException
      This method sets the number of rows to be displayed on each page.
      Parameters:
      pageRowsCount - Specifies the new number of rows per page.
      Throws:
      PagingException - if an error occurs while setting the page rows count.