PageBean.java
1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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;
}
}