| Modifier and Type | Field and Description |
|---|---|
private String |
isAsc
排序的方向desc或者asc
|
private List<T> |
list
数据
|
private String |
orderBy
排序列
|
private int |
pageNum
当前记录起始索引
|
private int |
pageSize
每页显示记录数
|
private long |
total
总量
|
| Constructor and Description |
|---|
Page() |
Page(int pageNum,
int pageSize) |
Page(int pageNum,
int pageSize,
String orderBy,
String isAsc) |
Page(List<T> list,
long total) |
Page(long total) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Page<T> |
empty() |
String |
getIsAsc() |
List<T> |
getList() |
String |
getOrderBy() |
int |
getPageNum() |
int |
getPageSize() |
long |
getTotal() |
static <T> Page<T> |
pageOf(Integer pageNum,
Integer size)
计算分页起始页
|
Page<T> |
setIsAsc(String isAsc) |
void |
setList(List<T> list) |
Page<T> |
setOrderBy(String orderBy) |
void |
setPageNum(int pageNum) |
void |
setPageSize(int pageSize) |
void |
setTotal(long total) |
private int pageNum
private int pageSize
private long total
public Page()
public Page(int pageNum, int pageSize)
public Page(long total)
public static <T> Page<T> pageOf(Integer pageNum, Integer size)
pageNum - 当前页码size - 每页显示记录数public int getPageNum()
public void setPageNum(int pageNum)
public int getPageSize()
public void setPageSize(int pageSize)
public long getTotal()
public void setTotal(long total)
public String getOrderBy()
getOrderBy in interface OrderBypublic Page<T> setOrderBy(String orderBy)
Copyright © 2024. All rights reserved.