page类
public class Page<T> implements IPage<T> {
private static final long serialVersionUID = 8545996863226528798L;
private List<T> records; 对象列表
private long total; 总记录
private long size; 每页记录数
private long current; 当前的页数
private List<OrderItem> orders;
private boolean optimizeCountSql;
private boolean isSearchCount;
public Page() {
this.records = Collections.emptyList();
this.total = 0L;
this.size = 10L;
this.current = 1L;
this.orders = new ArrayList();
this.optimizeCountSql = true;
this.isSearchCount = true;
}
public Page(long current, long size) {
当前页和每页记录数
this(current, size, 0L);
}
public Page(long current, long size, long total) {
当前页,每页记录数,总数
this(current, size, total, true);
}
public Page(long current, long size, boolean isSearchCount) {
this(current, size, 0L, isSearchCount);
}
public Page(long current, long size, long total, boolean isSearchCount) {
this.records = Collections.emptyList();
this.total = 0L;
this.size = 10L;