javaEE 分页, 封装的PageBean类


PageBean.java:

package com.xxx.domain;

import java.util.List;

public class PageBean {

	private int currentPage;  // 当前页, 第几页
	private int currentCount;  // 每页显示条数
	private int totalCount;   // 总记录数
	private int totalPage;  // 总页数。   int totalPage = (int) Math.ceil(1.0*totalCount/currentCount);
	private List list;   // 当前页要显示的所有JavaBean对象的集合
	public int getCurrentPage() {
		return currentPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	public int getCurrentCount() {
		return currentCount;
	}
	public void setCurrentCount(int currentCount) {
		this.currentCount = currentCount;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public int getTotalPage() {
		return totalPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public List getList() {
		return list;
	}
	public void setList(List list) {
		this.list = list;
	}
	
}


你可能感兴趣的:(javaEE)