Package org.codelibs.fess.app.pager
Class GroupPager
java.lang.Object
org.codelibs.fess.app.pager.GroupPager
- All Implemented Interfaces:
Serializable
GroupPager provides pagination functionality for group management operations in Fess.
This class manages the state and metadata required for paginated display of group lists,
including page navigation, record counts, and search criteria.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault current page number when pagination starts.static final intDefault number of records to display per page.Group ID for search filtering.Group name for search filtering.Version number for optimistic locking. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears all pagination data and search criteria, resetting the pager to its initial state.intGets the total number of pages available for pagination.intGets the total number of records available across all pages.intGets the current page number being displayed.protected intReturns the default current page number for pagination.protected intGets the default page size from the Fess configuration.Gets the list of page numbers to display in pagination navigation.intGets the number of records to display per page.booleanChecks whether a next page exists in the pagination.booleanChecks whether a previous page exists in the pagination.voidsetAllPageCount(int allPageCount) Sets the total number of pages available for pagination.voidsetAllRecordCount(int allRecordCount) Sets the total number of records available across all pages.voidsetCurrentPageNumber(int currentPageNumber) Sets the current page number being displayed.voidsetExistNextPage(boolean existNextPage) Sets the flag indicating whether a next page exists.voidsetExistPrePage(boolean existPrePage) Sets the flag indicating whether a previous page exists.voidsetPageNumberList(List<Integer> pageNumberList) Sets the list of page numbers to display in pagination navigation.voidsetPageSize(int pageSize) Sets the number of records to display per page.
-
Field Details
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZEDefault number of records to display per page.- See Also:
-
DEFAULT_CURRENT_PAGE_NUMBER
public static final int DEFAULT_CURRENT_PAGE_NUMBERDefault current page number when pagination starts.- See Also:
-
id
Group ID for search filtering. -
name
Group name for search filtering. -
versionNo
Version number for optimistic locking.
-
-
Constructor Details
-
GroupPager
public GroupPager()Default constructor for GroupPager. Initializes the pager with default values for pagination settings.
-
-
Method Details
-
clear
public void clear()Clears all pagination data and search criteria, resetting the pager to its initial state. This method resets record counts, pagination flags, and search parameters to their default values. -
getDefaultCurrentPageNumber
protected int getDefaultCurrentPageNumber()Returns the default current page number for pagination.- Returns:
- the default current page number (typically 1)
-
getAllRecordCount
public int getAllRecordCount()Gets the total number of records available across all pages.- Returns:
- the total record count
-
setAllRecordCount
public void setAllRecordCount(int allRecordCount) Sets the total number of records available across all pages.- Parameters:
allRecordCount- the total record count to set
-
getAllPageCount
public int getAllPageCount()Gets the total number of pages available for pagination.- Returns:
- the total page count
-
setAllPageCount
public void setAllPageCount(int allPageCount) Sets the total number of pages available for pagination.- Parameters:
allPageCount- the total page count to set
-
isExistPrePage
public boolean isExistPrePage()Checks whether a previous page exists in the pagination.- Returns:
- true if a previous page exists, false otherwise
-
setExistPrePage
public void setExistPrePage(boolean existPrePage) Sets the flag indicating whether a previous page exists.- Parameters:
existPrePage- true if a previous page exists, false otherwise
-
isExistNextPage
public boolean isExistNextPage()Checks whether a next page exists in the pagination.- Returns:
- true if a next page exists, false otherwise
-
setExistNextPage
public void setExistNextPage(boolean existNextPage) Sets the flag indicating whether a next page exists.- Parameters:
existNextPage- true if a next page exists, false otherwise
-
getPageSize
public int getPageSize()Gets the number of records to display per page. If the page size is not set or is invalid, returns the default page size.- Returns:
- the number of records per page
-
setPageSize
public void setPageSize(int pageSize) Sets the number of records to display per page.- Parameters:
pageSize- the number of records per page to set
-
getCurrentPageNumber
public int getCurrentPageNumber()Gets the current page number being displayed. If the current page number is not set or is invalid, returns the default current page number.- Returns:
- the current page number
-
setCurrentPageNumber
public void setCurrentPageNumber(int currentPageNumber) Sets the current page number being displayed.- Parameters:
currentPageNumber- the current page number to set
-
getPageNumberList
Gets the list of page numbers to display in pagination navigation.- Returns:
- the list of page numbers for navigation
-
setPageNumberList
Sets the list of page numbers to display in pagination navigation.- Parameters:
pageNumberList- the list of page numbers to set
-
getDefaultPageSize
protected int getDefaultPageSize()Gets the default page size from the Fess configuration.- Returns:
- the default page size configured in the system
-