📄 baseparameter.java
字号:
/*
* Created on 2006-9-22
* Last modified on 2007-1-1
* Powered by YeQiangWei.com
*/
package com.yeqiangwei.club.param;
import com.yeqiangwei.club.util.PaginationUtils;
import com.yeqiangwei.util.Validator;
/**
* 参数基类
* 将查询参数以对象方式注入,方便以后增加查询参数时而不必修改方法
* @author yeqiangwei
*/
public class BaseParameter implements java.io.Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
protected Integer page; /* 当前页 */
protected Integer rows; /* 每页行数 */
protected Byte orderBy;
public Byte getOrderBy() {
return orderBy;
}
public void setOrderBy(Byte orderBy) {
this.orderBy = orderBy;
}
public Integer getPage() {
return page;
}
public void setPage(Integer page) {
if(!Validator.isEmpty(page)&&page>1000){
this.page = 1000;
}else{
this.page = page;
}
}
public Integer getRows() {
return rows;
}
public void setRows(Integer rows) {
this.rows = rows;
}
public PaginationUtils getPagination(){
PaginationUtils p;
int s = 1;
int e = 30;
if(page!=null){
s = page.intValue();
}
if(rows!=null){
e = rows;
}
p = new PaginationUtils(s,e);
return p;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -