分页类的2

package com.haole.tools;

public class UtilPage {
//总页数
private int totalPage ;
//当前页数
private int currentPage ;
//每页的大小
private int pageSize;
//总记录数
private int totalCount ;

public int getTotalPage() {
return totalPage;
}
public void setTotalPage() {
if(totalCount%pageSize == 0){
totalPage = totalCount/pageSize ;
}else{
totalPage = totalCount/pageSize + 1 ;
}
}
public int getCurrentPage() {
return currentPage;
}
public void setCurrentPage(int currentPage) {
this.currentPage = currentPage;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalcount() {
return totalCount ;
}
public void setTotalcount(int totalCount) {
this.totalCount = totalCount ;
}

}

你可能感兴趣的:(分页)