Package | Description |
---|---|
com.yishuifengxiao.common.tool.collections |
java 集合操作工具
|
com.yishuifengxiao.common.tool.entity |
基础通用对象
|
com.yishuifengxiao.common.tool.utils |
自定义工具
|
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
EmptyUtil.isEmpty(Page<T> page)
判断分页对象是否为空
|
static <T> boolean |
EmptyUtil.notEmpty(Page<T> page)
判断分页对象是否不为空
|
Modifier and Type | Class and Description |
---|---|
class |
JpaPage<S>
基于JPA分页对象的分页对象
|
class |
TkPage<S>
基于mybatis分页对象的分页对象
|
Modifier and Type | Method and Description |
---|---|
<T> Page<T> |
Page.convert(PageConverter<S,T> converter)
将一种类型数据的分页对象转换成另一种数据类型的分页对象
|
<T> Page<T> |
Page.convert(PageConverter<S,T> converter,
boolean isFilterNull)
将一种类型数据的分页对象转换成另一种数据类型的分页对象
|
static <S> Page<S> |
Page.of(List<S> data,
long total,
int pageSize,
int pageNum)
生成分页对象
|
static <S> Page<S> |
JpaPage.of(org.springframework.data.domain.Page<S> page)
根据spring data的分页对象构造一个分页对象
|
static <S,U> Page<S> |
Page.of(Page<U> source,
List<S> data)
根据分页信息来源对象生成分页对象
|
static <S> Page<S> |
TkPage.of(com.github.pagehelper.PageInfo<S> page)
根据mybatis的分页对象构建一个的通用分页对象
|
static <S> Page<S> |
Page.ofEmpty()
构造一个空的分页对象
|
static <S> Page<S> |
Page.ofEmpty(int pageSize)
构造一个空的分页对象
|
Page<S> |
Page.setData(List<S> data)
设置当前页里包含的数据
|
Page<S> |
Page.setPageNum(int pageNum)
设置当前页页码
|
Page<S> |
Page.setPages(long pages)
设置分页的数量
|
Page<S> |
Page.setPageSize(int pageSize)
设置分页大小
|
Page<S> |
Page.setTotal(long total)
设置总的总的记录的数量
|
static <S> Page<S> |
Page.toPage(List<S> data)
根据数据构造当前页为1,分页大小为数据大小的分页对象
|
static <S> Page<S> |
Page.toPage(List<S> list,
int pageSize,
int pageNum)
从总的数据中根据分页参数获取一个分页对象
|
Modifier and Type | Method and Description |
---|---|
static <S,U> Page<S> |
Page.of(Page<U> source,
List<S> data)
根据分页信息来源对象生成分页对象
|
Modifier and Type | Method and Description |
---|---|
static <T> void |
Assert.assertEmpty(String msg,
Page<T> page)
判断分页对象是否为空,若不为空则抛出异常
|
static <T> void |
Assert.assertNoEmpty(String msg,
Page<T> page)
判断分页对象是否不为空,若为空则抛出异常
|
Copyright © 2021. All rights reserved.