java.lang.Object
org.miaixz.bus.pager.PageParam
- All Implemented Interfaces:
Paging
Base class for pagination parameters. Extend this class to directly control pagination parameters.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for PageParam.Constructs a PageParam with a specified page number and page size.Constructs a PageParam with a specified page number, page size, and order by clause. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the order by clause.Retrieves the current page number.Retrieves the number of records per page.voidsetOrderBy(String orderBy) Sets the order by clause.voidSets the current page number.voidsetPageSize(Integer pageSize) Sets the number of records per page.
-
Constructor Details
-
PageParam
public PageParam()Default constructor for PageParam. -
PageParam
Constructs a PageParam with a specified page number and page size.- Parameters:
pageNo- the page number (starts from 1)pageSize- the number of records per page
-
PageParam
Constructs a PageParam with a specified page number, page size, and order by clause.- Parameters:
pageNo- the page number (starts from 1)pageSize- the number of records per pageorderBy- the order by clause for sorting
-
-
Method Details
-
getPageNo
Retrieves the current page number. -
setPageNo
Sets the current page number.- Parameters:
pageNo- the page number to set
-
getPageSize
Retrieves the number of records per page.- Specified by:
getPageSizein interfacePaging- Returns:
- the page size
-
setPageSize
Sets the number of records per page.- Parameters:
pageSize- the page size to set
-
getOrderBy
Retrieves the order by clause.- Specified by:
getOrderByin interfacePaging- Returns:
- the order by clause
-
setOrderBy
Sets the order by clause.- Parameters:
orderBy- the order by clause to set
-