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;
}
}