因分页需要用到 【当前页】 【总页数】 【当前页的列表对象】 故多次返回麻烦 所以一次封装到一个pageBean对象中返回
package cn.itcast.vo;
import java.util.ArrayList;
import java.util.List;
public class PageBean<T> {
//每次显示的数据
private List<T> list = new ArrayList<T>();
//总页数
private Integer totalPage;
//当前页
private Integer currentPage;
//总条数
private Integer totalCount;
//当前页显示的条数
private Integer currentCount;
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
public Integer getTotalPage() {
return totalPage;
}
public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage;
}
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getTotalCount() {
return totalCount;
}
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
public Integer getCurrentCount() {
return currentCount;
}
public void setCurrentCount(Integer currentCount) {
this.currentCount = currentCount;
}
}