ModelAndPage.java
1.1 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
package com.tianbo.common;
import com.tianbo.util.dao.Page;
import com.tianbo.util.dao.Totals;
import java.io.Serializable;
import java.util.List;
/**
* 返回对象以及对象分页
* @param <T>
*/
public class ModelAndPage<T> implements Serializable {
private static final long serialVersionUID = 6732325477388107799L;
private List<T> modelList;
private Page page;
private Totals totals;
public ModelAndPage(){
}
public ModelAndPage(List<T> list,Page page){
this.modelList = list;
this.page = page;
}
public ModelAndPage(List<T> list,Page page,Totals totals){
this.modelList = list;
this.page = page;
this.totals = totals;
}
public List<T> getModel() {
return modelList;
}
public void setModel(List<T> model) {
this.modelList = model;
}
public Page getPage() {
return page;
}
public void setPage(Page page) {
this.page = page;
}
public Totals getTotals() {
return totals;
}
public void setTotals(Totals totals) {
this.totals = totals;
}
}