PageBean.java 1.43 KB
package com.hotent.entity.query;


import java.io.Serializable;

/**
 * 分页对象
 * 
 * @company 广州宏天软件股份有限公司
 * @author heyifan
 * @email heyf@jee-soft.cn
 * @date 2018年4月4日
 */

public class PageBean implements Serializable{
	private static final long serialVersionUID = -3758630357085712072L;
	/**
	 * 默认每页显示的记录数
	 */
	public static final int DEFAULT_PAGE_SIZE = 10;
	
	/**
	 * 不分页
	 */
	public static final Integer WITHOUT_PAGE = -1;
	/**
	 * 默认显示第一页
	 */
	public final static int NO_PAGE = 1;

	protected int page = NO_PAGE;

	protected int pageSize = DEFAULT_PAGE_SIZE;

	protected boolean showTotal = true;

	public PageBean(){}

	public PageBean(Integer page){
		this.page = page;
	}

	public PageBean(Boolean showTotal){
		this.showTotal = showTotal;
	}

	public PageBean(Integer page, Integer pageSize){
		this.page = page;
		this.pageSize = pageSize;
	}

	public PageBean(Integer page, Integer pageSize, Boolean showTotal){
		this.page = page;
		this.pageSize = pageSize;
		this.showTotal = showTotal;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public Integer getPage() {
		return page;
	}

	public boolean showTotal() {
		return showTotal;
	}

	public void setShowTotal(boolean showTotal) {
		this.showTotal = showTotal;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}


}