接口 IPage<T>

所有超级接口:
Serializable

public interface IPage<T>
extends Serializable
分页 Page 对象接口
从以下版本开始:
2018-06-09
作者:
hubin
  • 方法概要

    修饰符和类型 方法 说明
    default String cacheKey()
    已过时。
    3.4.0 @2020-06-30
    default Map<Object,​Object> condition()
    已过时。
    3.4.0 @2020-06-30
    default <R> IPage<R> convert​(Function<? super T,​? extends R> mapper)
    IPage 的泛型转换
    default String countId()
    老分页插件不支持
    long getCurrent()
    当前页
    default long getPages()
    当前分页总页数
    List<T> getRecords()
    分页记录列表
    long getSize()
    获取每页显示条数
    long getTotal()
    当前满足条件总行数
    default void hitCount​(boolean hit)
    已过时。
    3.4.0 @2020-06-30 缓存遵循mybatis的一或二缓
    default boolean isHitCount()
    已过时。
    3.4.0 @2020-06-30 缓存遵循mybatis的一或二缓
    default boolean isSearchCount()
    进行 count 查询 【 默认: true 】
    default Long maxLimit()
    最大每页分页数限制,优先级高于分页插件内的 maxLimit
    default long offset()
    计算当前分页偏移量
    default boolean optimizeCountSql()
    自动优化 COUNT SQL【 默认:true 】
    List<OrderItem> orders()
    获取排序信息,排序的字段和正反序
    IPage<T> setCurrent​(long current)
    设置当前页
    default IPage<T> setPages​(long pages)
    内部什么也不干
    IPage<T> setRecords​(List<T> records)
    设置分页记录列表
    IPage<T> setSize​(long size)
    设置每页显示条数
    IPage<T> setTotal​(long total)
    设置当前满足条件总行数
  • 方法详细资料

    • orders

      List<OrderItem> orders()
      获取排序信息,排序的字段和正反序
      返回:
      排序信息
    • condition

      @Deprecated default Map<Object,​Object> condition()
      已过时。
      3.4.0 @2020-06-30
      KEY/VALUE 条件
      返回:
      ignore
    • optimizeCountSql

      default boolean optimizeCountSql()
      自动优化 COUNT SQL【 默认:true 】
      返回:
      true 是 / false 否
    • isSearchCount

      default boolean isSearchCount()
      进行 count 查询 【 默认: true 】
      返回:
      true 是 / false 否
    • offset

      default long offset()
      计算当前分页偏移量
    • maxLimit

      default Long maxLimit()
      最大每页分页数限制,优先级高于分页插件内的 maxLimit
      从以下版本开始:
      3.4.0 @2020-07-17
    • getPages

      default long getPages()
      当前分页总页数
    • setPages

      default IPage<T> setPages​(long pages)
      内部什么也不干

      只是为了 json 反序列化时不报错

    • hitCount

      @Deprecated default void hitCount​(boolean hit)
      已过时。
      3.4.0 @2020-06-30 缓存遵循mybatis的一或二缓
      设置是否命中count缓存
      参数:
      hit - 是否命中
      从以下版本开始:
      3.3.1
    • isHitCount

      @Deprecated default boolean isHitCount()
      已过时。
      3.4.0 @2020-06-30 缓存遵循mybatis的一或二缓
      是否命中count缓存
      返回:
      是否命中count缓存
      从以下版本开始:
      3.3.1
    • getRecords

      List<T> getRecords()
      分页记录列表
      返回:
      分页对象记录列表
    • setRecords

      IPage<T> setRecords​(List<T> records)
      设置分页记录列表
    • getTotal

      long getTotal()
      当前满足条件总行数
      返回:
      总条数
    • setTotal

      IPage<T> setTotal​(long total)
      设置当前满足条件总行数
    • getSize

      long getSize()
      获取每页显示条数
      返回:
      每页显示条数
    • setSize

      IPage<T> setSize​(long size)
      设置每页显示条数
    • getCurrent

      long getCurrent()
      当前页
      返回:
      当前页
    • setCurrent

      IPage<T> setCurrent​(long current)
      设置当前页
    • convert

      default <R> IPage<R> convert​(Function<? super T,​? extends R> mapper)
      IPage 的泛型转换
      类型参数:
      R - 转换后的泛型
      参数:
      mapper - 转换函数
      返回:
      转换泛型后的 IPage
    • countId

      default String countId()
      老分页插件不支持

      MappedStatement 的 id

      返回:
      id
      从以下版本开始:
      3.4.0 @2020-06-19
    • cacheKey

      @Deprecated default String cacheKey()
      已过时。
      3.4.0 @2020-06-30
      生成缓存key值
      返回:
      缓存key值
      从以下版本开始:
      3.3.2