Page.java 614 Bytes
Newer Older
yuquan.zhu committed
1 2 3 4
package cn.timer.api.utils;

/**
 * 分页查询工具类
tangzhaoqian committed
5
 * 
yuquan.zhu committed
6 7 8 9 10
 * @author Administrator
 *
 */

public class Page {
tangzhaoqian committed
11 12 13 14
	
	/**
	 * 当前页
	 */
yuquan.zhu committed
15
	private Integer currentPage;
16
	
tangzhaoqian committed
17 18 19 20 21
	/**
	 * 每页总条数
	 */
	private Integer totalPage;

22 23 24
	public Integer getCurrentPage() {
		return currentPage == null || currentPage <= 0 ? 1 : currentPage;
	}
tangzhaoqian committed
25

26
	public void setCurrentPage(Integer currentPage) {
tangzhaoqian committed
27

28 29
		this.currentPage = currentPage;
	}
tangzhaoqian committed
30

31
	public Integer getTotalPage() {
tangzhaoqian committed
32

33 34
		return totalPage == null || totalPage <= 0 ? 10 : totalPage;
	}
tangzhaoqian committed
35

36
	public void setTotalPage(Integer totalPage) {
tangzhaoqian committed
37

38 39
		this.totalPage = totalPage;
	}
tangzhaoqian committed
40

yuquan.zhu committed
41
}