public class Page<E> extends Object implements Serializable
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
checkLimit(Integer limit,
int def)
检查pagesize是否满足条件
|
static int |
checkPage(Integer page,
int def)
检查page 是否满足条件
|
int |
getCode() |
long |
getCount() |
List<E> |
getData() |
static <T> List<T> |
getList(List<T> list,
Integer page,
Integer limit)
某些特殊情况不能再数据库分页 采用自行分页
|
static int |
getMaxPage(int total,
int limit)
得到最大页数
|
String |
getMsg() |
long |
getNowpage() |
static int |
getStartIndex(Integer page,
Integer limit,
int def)
得到分页开始下标
|
long |
getTotalpage() |
void |
setCode(int code) |
void |
setCount(long count) |
void |
setData(List<E> data) |
void |
setMsg(String msg) |
void |
setNowpage(long nowpage) |
void |
setTotalpage(long totalpage) |
String |
toString() |
public long getTotalpage()
public void setTotalpage(long totalpage)
public long getNowpage()
public void setNowpage(long nowpage)
public int getCode()
public void setCode(int code)
public String getMsg()
public void setMsg(String msg)
public long getCount()
public void setCount(long count)
public static int checkPage(Integer page, int def)
page - def - public static int checkLimit(Integer limit, int def)
limit - def - public static int getStartIndex(Integer page, Integer limit, int def)
page - limit - def - public static int getMaxPage(int total,
int limit)
page - limit - def - public static <T> List<T> getList(List<T> list, Integer page, Integer limit)
list - page - limit - Copyright © 2019. All rights reserved.