首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

java分页实业

2014-07-05 
java分页实体public class Page implements java.io.Serializable {/** 当前分页号. */private int curren

java分页实体

public class Page implements java.io.Serializable {/** 当前分页号. */private int currentPage;/** 总信息条数. *///private long totalCount;private long allCount;public long getAllCount() {return allCount;}public void setAllCount(long allCount) {this.allCount = allCount;}/** 总页数. */private int pages;/** 查询结果. */private List result;/** 一页显示条数. */private int pageSize;/** * @return Returns the currentPage. */public int getCurrentPage() {return currentPage;}/** * @param currentPage *            The currentPage to set. */public void setCurrentPage(int currentPage) {this.currentPage = currentPage;}/** * @return Returns the pages. */public int getPages() {return pages;}/** * @param pages *            The pages to set. */public void setPages(int pages) {this.pages = pages;}/** * @return Returns the totalCount. *//** * @param totalCount *            The totalCount to set. */public void setTotalCount(long allCount) {this.allCount = allCount;// 计算总页数if (0 < this.pageSize) {if (0 == this.allCount % this.pageSize) {this.pages = (int) (this.allCount / this.pageSize);} else {this.pages = (int) (this.allCount / this.pageSize + 1);}}}/** * @return Returns the result. */public List getResult() {return result;}/** * @param result *            The result to set. */public void setResult(List result) {this.result = result;}/** * @return Returns the pageSize. */public int getPageSize() {return pageSize;}/** * @param pageSize *            The pageSize to set. */public void setPageSize(int pageSize) {this.pageSize = pageSize;}}
? 1 楼 nuysoft 2011-09-24   觉得略显简陋,不是指功能,是指会各种非法值的修正

热点排行