Module bus.pager

Class PageParams

java.lang.Object
org.miaixz.bus.pager.binding.PageParams

public class PageParams extends Object
分页参数配置类,负责管理和解析分页相关参数。
Since:
Java 17+
Author:
Kimi Liu
  • Field Details

    • offsetAsPageNo

      protected boolean offsetAsPageNo
      是否将RowBounds的offset作为页码使用,默认false
    • rowBoundsWithCount

      protected boolean rowBoundsWithCount
      RowBounds是否执行count查询,默认false
    • pageSizeZero

      protected boolean pageSizeZero
      当为true且pageSize为0(或RowBounds的limit=0)时,返回全部结果
    • reasonable

      protected boolean reasonable
      是否启用分页合理化,默认false
    • supportMethodsArguments

      protected boolean supportMethodsArguments
      是否支持通过接口参数传递分页参数,默认false
    • countColumn

      protected String countColumn
      默认count查询列,默认为"0"
  • Constructor Details

    • PageParams

      public PageParams()
  • Method Details

    • getPage

      public Page getPage(Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds)
      获取分页参数对象。
      Parameters:
      parameterObject - 查询参数对象
      rowBounds - MyBatis RowBounds对象
      Returns:
      分页对象,若无分页参数则返回null
    • setProperties

      public void setProperties(Properties properties)
      设置分页相关配置属性。
      Parameters:
      properties - 配置属性
    • isOffsetAsPageNo

      public boolean isOffsetAsPageNo()
      是否将offset作为页码使用。
      Returns:
      是否启用offset作为页码
    • isRowBoundsWithCount

      public boolean isRowBoundsWithCount()
      RowBounds是否执行count查询。
      Returns:
      是否执行count查询
    • isPageSizeZero

      public boolean isPageSizeZero()
      是否在pageSize为0时返回全部结果。
      Returns:
      是否启用pageSizeZero
    • isReasonable

      public boolean isReasonable()
      是否启用分页合理化。
      Returns:
      是否启用合理化
    • isSupportMethodsArguments

      public boolean isSupportMethodsArguments()
      是否支持接口参数传递分页参数。
      Returns:
      是否支持接口参数
    • getCountColumn

      public String getCountColumn()
      获取count查询列名。
      Returns:
      count查询列名
    • isAsyncCount

      public boolean isAsyncCount()
      是否启用异步count查询。
      Returns:
      是否启用异步count