package com.ifish.validator;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;


/**
 * 分页数据参数
 * @author Administrator
 *
 */
public class PageParam{
	
	/**
	 * 用户ID
	 */
	@NotNull
	@Min(1)
	private Integer userId;
	/**
	 * 开始行
	 */
	@NotNull
	@Min(0)
	private Integer firstResult;
	/**
	 * 分页大小
	 */
	@NotNull
	@Min(1)
	@Max(20)
	private Integer pageSize;
	
	public PageParam() {}
	
	public PageParam(Integer userId, Integer firstResult, Integer pageSize) {
		this.userId = userId;
		this.firstResult = firstResult;
		this.pageSize = pageSize;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public Integer getFirstResult() {
		return firstResult;
	}
	public void setFirstResult(Integer firstResult) {
		this.firstResult = firstResult;
	}
	public Integer getPageSize() {
		return pageSize;
	}
	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}
	
}
