工具类
/** * @Title: PageUtil.java * @Package * @Description: TODO(用一句话描述该文件做什么) * @author licy * @date 2018年11月8日 * @version V1.0 */ public class PageUtil { private int pageSize = 10;//count of everyPage data, default 10 private int pageNo = 1;//the No of the page private int totalCount;//count of all data private int totalPage;//count of all page public int getPageSize() { return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public int getPageNo() { return pageNo; } public void setPageNo(int pageNo) { this.pageNo = pageNo; } public int getTotalCount() { return totalCount; } public void setTotalCount(int totalCount) { this.totalCount = totalCount; } public int getTotalPage() { return totalPage; } public void setTotalPage(int totalPage) { totalPage = totalCount / pageSize; if (totalCount % pageSize != 0) { totalPage = totalPage + 1; } } }