public class Page<T> implements Serializable { private static final long serialVersionUID = -5395997221963176643L; private List<T> list; private int pageNumber; private int pageSize; private int totalPage; private int totalRow; public Page(List<T> list, int pageNumber, int pageSize, int totalPage, int totalRow) { this.list = list; this.pageNumber = pageNumber; this.pageSize = pageSize; this.totalPage = totalPage; this.totalRow = totalRow; } public List<T> getList() { return this.list; } public int getPageNumber() { return this.pageNumber; } public int getPageSize() { return this.pageSize; } public int getTotalPage() { return this.totalPage; } public int getTotalRow() { return this.totalRow; } public boolean isFirstPage() { return (this.pageNumber == 1); } public boolean isLastPage() { return (this.pageNumber == this.totalPage); } }
居然只有get,如果我要拿去分页数据处理逻辑,再返回就麻烦了,而且很多这样的需求哦
项目:JFinal