BannerBean.java
3.65 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
package com.cnlive.goldenline.model.home;
import android.support.annotation.NonNull;
public class BannerBean implements java.io.Serializable {
/**
* 定义本类的私有变量
*/
private Integer id;
private String name;
private String description;
private String image;
private String hyperlink;
private Integer sort;
private Integer type;
/**
* 是否需要用户参数 0-不需要,1-需要
*/
private Integer needParams;
/**
* 0_不隐藏 1_隐藏 默认0
*/
private int hiddenTitleBar;
/**
* 本类的实例化方法
*/
public BannerBean() {
}
/**
* 本类的带参数的实例化方法
*/
public BannerBean(Integer id, String name, String description, String image, String hyperlink, Integer sort, Integer type, Integer needParams,
int hiddenTitleBar) {
super();
this.id = id;
this.name = name;
this.description = description;
this.image = image;
this.hyperlink = hyperlink;
this.sort = sort;
this.type = type;
this.needParams = needParams;
this.hiddenTitleBar = hiddenTitleBar;
}
/**
* 以本类为参数传入时,实例化本类的方法
*/
public void copyFrom(@NonNull BannerBean vo) {
id = vo.id;
name = vo.name;
description = vo.description;
image = vo.image;
hyperlink = vo.hyperlink;
sort = vo.sort;
type = vo.type;
needParams = vo.needParams;
hiddenTitleBar = vo.hiddenTitleBar;
}
/**
* 本类的赋值方法
*/
public void setData(@NonNull BannerBean vo) {
this.copyFrom(vo);
}
/**
* 本类的取值方法
*/
@NonNull
public BannerBean getData() {
BannerBean result = new BannerBean();
result.copyFrom(this);
return result;
}
/**
* id的赋值方法
*/
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getHyperlink() {
return hyperlink;
}
public void setHyperlink(String hyperlink) {
this.hyperlink = hyperlink;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@NonNull
public Integer getType() {
return type == null ? 0 : type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getId() {
return id;
}
/**
* 是否需要用户参数 0-不需要,1-需要
*/
@NonNull
public Integer getNeedParams() {
return needParams == null ? 0 : needParams;
}
public void setNeedParams(Integer needParams) {
this.needParams = needParams;
}
public int getHiddenTitleBar() {
return hiddenTitleBar;
}
public void setHiddenTitleBar(int hiddenTitleBar) {
this.hiddenTitleBar = hiddenTitleBar;
}
@NonNull
@Override
public String toString() {
return "IBannerBean [id=" + id + ", name=" + name + ", description=" + description + ", image=" + image + ", hyperlink=" + hyperlink + ", sort="
+ sort + ", type=" + type + "]";
}
}