实现方式一
package com.gwx.entity;
import java.util.List;
public class PageBean<T> {
private Integer currentPage;
private Integer totalPage;
private Integer currentCount;
private Integer totalCount;
private List<T> list;
public Integer getCurrentPage() {
return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
public Integer getTotalPage() {
return totalPage;
}
public void setTotalPage(Integer totalPage) {
this.totalPage = totalPage;
}
public Integer getCurrentCount() {
return currentCount;
}
public void setCurrentCount(Integer currentCount) {
this.currentCount = currentCount;
}
public Integer getTotalCount() {
return totalCount;
}
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
public List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
}
实现方式二
package com.gwx.utils;
import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
/**
* 作者:Alvin
* 日期:2017年3月24日
* 时间:下午4:18:57
* 描述:这是一个分页的实体类,适用于easyui框架
*/
public class PageBean {
private int currentPage;
private int pageSize;
private Long total;
private DetachedCriteria dc;
private List<?> rows;
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 Long getTotal() {
return total;
}
public void setTotal(Long total) {
this.total = total;
}
public DetachedCriteria getDc() {
return dc;
}
public void setDc(DetachedCriteria dc) {
this.dc = dc;
}
public List<?> getRows() {
return rows;
}
public void setRows(List<?> rows) {
this.rows = rows;
}
}