E - 实体类public class PageSupport<E> extends Object implements PageResult<E>
FIRST_PAGE| 构造器和说明 |
|---|
PageSupport() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
fatchCurrentPageIndex() |
int |
fatchFirstPageIndex()
首页
|
int |
fatchLastPageIndex()
最后一页
|
List<E> |
fatchList()
结果集
|
int |
fatchNextPageIndex()
下一页
|
int |
fatchPageCount()
共几页
|
int |
fatchPageIndex()
当前页索引,等同于getCurrentPageIndex()
|
int |
fatchPageSize()
每页显示几条记录
|
int |
fatchPrePageIndex()
上一页
|
int |
fatchStart()
起始页索引,从0开始
|
long |
fatchTotal()
总记录数
|
PageResult |
process(EntityProcessor<E> processor) |
static <E> List<Object> |
processEntityToJSONObject(List<E> list,
EntityProcessor<E> processor)
将list中的entity对象处理成JSONObject对象
|
void |
setList(List<E> list)
设置结果集
|
void |
setPageCount(int pageCount)
设置总页数
|
void |
setPageIndex(int pageIndex)
设置当前页索引
|
void |
setPageSize(int pageSize)
设置每页记录数
|
void |
setStart(int start)
设置第一条记录起始位置
|
void |
setTotal(long total)
设置记录总数
|
String |
toString() |
public PageResult process(EntityProcessor<E> processor)
public static <E> List<Object> processEntityToJSONObject(List<E> list, EntityProcessor<E> processor)
E - 实体类list - 数据源processor - 处理器public int fatchCurrentPageIndex()
public int fatchPrePageIndex()
public int fatchNextPageIndex()
public int fatchFirstPageIndex()
public int fatchLastPageIndex()
public long fatchTotal()
public int fatchPageIndex()
public int fatchPageSize()
public int fatchStart()
public int fatchPageCount()
public void setTotal(long total)
PageResultsetTotal 在接口中 PageResult<E>total - 总记录数public void setPageIndex(int pageIndex)
PageResultsetPageIndex 在接口中 PageResult<E>pageIndex - 当前页索引public void setPageSize(int pageSize)
PageResultsetPageSize 在接口中 PageResult<E>pageSize - 每页记录数public void setPageCount(int pageCount)
PageResultsetPageCount 在接口中 PageResult<E>pageCount - 总页数public void setStart(int start)
PageResultsetStart 在接口中 PageResult<E>start - 起始位置public void setList(List<E> list)
PageResultsetList 在接口中 PageResult<E>list - 结果集Copyright © 2021. All Rights Reserved.