Module bus.pager

Class PageParam

java.lang.Object
org.miaixz.bus.pager.PageParam
All Implemented Interfaces:
Paging

public class PageParam extends Object implements Paging
Base class for pagination parameters. Extend this class to directly control pagination parameters.
Since:
Java 17+
Author:
Kimi Liu
  • Constructor Details

    • PageParam

      public PageParam()
      Default constructor for PageParam.
    • PageParam

      public PageParam(Integer pageNo, Integer pageSize)
      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

      public PageParam(Integer pageNo, Integer pageSize, String orderBy)
      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 page
      orderBy - the order by clause for sorting
  • Method Details

    • getPageNo

      public Integer getPageNo()
      Retrieves the current page number.
      Specified by:
      getPageNo in interface Paging
      Returns:
      the page number
    • setPageNo

      public void setPageNo(Integer pageNo)
      Sets the current page number.
      Parameters:
      pageNo - the page number to set
    • getPageSize

      public Integer getPageSize()
      Retrieves the number of records per page.
      Specified by:
      getPageSize in interface Paging
      Returns:
      the page size
    • setPageSize

      public void setPageSize(Integer pageSize)
      Sets the number of records per page.
      Parameters:
      pageSize - the page size to set
    • getOrderBy

      public String getOrderBy()
      Retrieves the order by clause.
      Specified by:
      getOrderBy in interface Paging
      Returns:
      the order by clause
    • setOrderBy

      public void setOrderBy(String orderBy)
      Sets the order by clause.
      Parameters:
      orderBy - the order by clause to set