Package com.jk.data.dynamic.paging
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 TypeMethodDescriptionint
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
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
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
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
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
This method moves to the first page in the data set.- Throws:
PagingException
- if an error occurs while navigating to the first page.
-
moveToLastPage
This method moves to the last page in the data set.- Throws:
PagingException
- if an error occurs while navigating to the last page.
-
moveToNextPage
This method moves to the next page in the data set.- Throws:
PagingException
- if an error occurs while navigating to the next page.
-
moveToPage
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
This method moves to the previous page in the data set.- Throws:
PagingException
- if an error occurs while navigating to the previous page.
-
setPageRowsCount
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.
-