类 PageParam<T,U extends BaseParam>

java.lang.Object
com.baomidou.mybatisplus.extension.plugins.pagination.Page<T>
net.sohelp.boot.demo.core.base.PageParam<T,U>
所有已实现的接口:
com.baomidou.mybatisplus.core.metadata.IPage<T>, Serializable

public class PageParam<T,U extends BaseParam> extends com.baomidou.mybatisplus.extension.plugins.pagination.Page<T>
分页、排序、搜索参数封装
从以下版本开始:
2019-04-26 10:34:35
作者:
AaronFung
另请参阅:
  • 构造器概要

    构造器
    构造器
    说明
    默认构造方法,使用null作为查询条件并启用驼峰转下划线
    PageParam(U where)
    使用指定查询条件构造PageParam对象,默认启用驼峰转下划线
    PageParam(U where, boolean isToUnderlineCase)
    使用指定查询条件和转换选项构造PageParam对象
  • 方法概要

    修饰符和类型
    方法
    说明
    getOne(List<T> records)
    从记录列表中获取第一条记录
    com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T>
    获取包含排序信息的查询条件包装器
    com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T>
    getOrderWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T> queryWrapper)
    在已有的查询条件基础上添加排序信息
    com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T>
    getWrapper(String... excludes)
    根据查询条件构建QueryWrapper,排除指定字段
    com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T>
    getWrapperWith(String... columns)
    根据查询条件构建QueryWrapper,只包含指定字段
    设置默认排序方式,当当前没有设置排序时生效
    setDefaultOrder(List<com.baomidou.mybatisplus.core.metadata.OrderItem> orderItems)
    设置默认排序方式,当当前没有设置排序时生效
    sortRecords(List<T> records)
    对记录列表进行内存排序

    从类继承的方法 com.baomidou.mybatisplus.extension.plugins.pagination.Page

    addOrder, addOrder, countId, getCurrent, getPages, getRecords, getSize, getTotal, hasNext, hasPrevious, maxLimit, of, of, of, of, optimizeCountSql, optimizeJoinOfCountSql, orders, searchCount, setCountId, setCurrent, setMaxLimit, setOptimizeCountSql, setOptimizeJoinOfCountSql, setOrders, setRecords, setSearchCount, setSize, setTotal, toString

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    从接口继承的方法 com.baomidou.mybatisplus.core.metadata.IPage

    convert, offset, setPages
  • 构造器详细资料

    • PageParam

      public PageParam()
      默认构造方法,使用null作为查询条件并启用驼峰转下划线
    • PageParam

      public PageParam(U where)
      使用指定查询条件构造PageParam对象,默认启用驼峰转下划线
      参数:
      where - 查询条件对象
    • PageParam

      public PageParam(U where, boolean isToUnderlineCase)
      使用指定查询条件和转换选项构造PageParam对象
      参数:
      where - 查询条件对象
      isToUnderlineCase - 是否将字段名从驼峰命名转换为下划线命名
  • 方法详细资料

    • setDefaultOrder

      public PageParam<T,U> setDefaultOrder(List<com.baomidou.mybatisplus.core.metadata.OrderItem> orderItems)
      设置默认排序方式,当当前没有设置排序时生效
      参数:
      orderItems - 排序方式列表
      返回:
      PageParam实例本身
    • setDefaultOrder

      public PageParam<T,U> setDefaultOrder(String orderSQL)
      设置默认排序方式,当当前没有设置排序时生效
      参数:
      orderSQL - 排序SQL语句
      返回:
      PageParam实例本身
    • getWrapper

      public com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T> getWrapper(String... excludes)
      根据查询条件构建QueryWrapper,排除指定字段
      参数:
      excludes - 不包含的字段数组
      返回:
      QueryWrapper对象
    • getWrapperWith

      public com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T> getWrapperWith(String... columns)
      根据查询条件构建QueryWrapper,只包含指定字段
      参数:
      columns - 只包含的字段数组
      返回:
      QueryWrapper对象
    • getOrderWrapper

      public com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T> getOrderWrapper()
      获取包含排序信息的查询条件包装器
      返回:
      包含排序的QueryWrapper对象
    • getOrderWrapper

      public com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T> getOrderWrapper(com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<T> queryWrapper)
      在已有的查询条件基础上添加排序信息
      参数:
      queryWrapper - 不含排序的QueryWrapper对象
      返回:
      包含排序的QueryWrapper对象
    • getOne

      public T getOne(List<T> records)
      从记录列表中获取第一条记录
      参数:
      records - 记录列表
      返回:
      第一条记录,如果列表为空则返回null
    • sortRecords

      public List<T> sortRecords(List<T> records)
      对记录列表进行内存排序
      参数:
      records - 待排序的记录列表
      返回:
      排序后的记录列表