新闻发布项目——分页公共类(PageUitl )

package bdqn.newsManageServlet.Util;
/**
 * 分页的类
 * @author Administrator
 *
 */
public class PageUitl {
	private int pagesize;//页大小
	private int pageindex=1;//页码
	private int recordCount;//总记录数
	private int totalPageCount;//总页数
	
	//计算总页数
	public int getTotalPageCount() {
		totalPageCount = recordCount % pagesize == 0 ? recordCount / pagesize
				: recordCount / pagesize + 1;
		return totalPageCount;
	}
	public int getPagesize() {
		return pagesize;
	}
	public void setPagesize(int pagesize) {
		this.pagesize = pagesize;
	}
	public int getPageindex() {
		return pageindex;
	}
	public void setPageindex(int pageindex) {
		this.pageindex = pageindex;
	}
	public int getRecordCount() {
		return recordCount;
	}
	public void setRecordCount(int recordCount) {
		this.recordCount = recordCount;
	}
	

}

posted @ 2016-11-24 20:17  穆雄雄  阅读(203)  评论(0编辑  收藏  举报