1
2
3
4
5
6 package fr.ifremer.quadrige3.core.dao.system;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 import fr.ifremer.quadrige3.core.dao.administration.user.Department;
29 import fr.ifremer.quadrige3.core.dao.administration.user.Quser;
30 import java.io.Serializable;
31 import java.sql.Timestamp;
32
33
34
35
36
37 public abstract class MapProject
38 implements Serializable, Comparable<MapProject>
39 {
40
41
42
43 private static final long serialVersionUID = -6142234822980131325L;
44
45
46 private Integer mapProjectId;
47
48
49
50
51
52 public Integer getMapProjectId()
53 {
54 return this.mapProjectId;
55 }
56
57
58
59
60
61 public void setMapProjectId(Integer mapProjectIdIn)
62 {
63 this.mapProjectId = mapProjectIdIn;
64 }
65
66 private String mapProjectNm;
67
68
69
70
71
72 public String getMapProjectNm()
73 {
74 return this.mapProjectNm;
75 }
76
77
78
79
80
81 public void setMapProjectNm(String mapProjectNmIn)
82 {
83 this.mapProjectNm = mapProjectNmIn;
84 }
85
86 private String mapProjetConfig;
87
88
89
90
91
92 public String getMapProjetConfig()
93 {
94 return this.mapProjetConfig;
95 }
96
97
98
99
100
101 public void setMapProjetConfig(String mapProjetConfigIn)
102 {
103 this.mapProjetConfig = mapProjetConfigIn;
104 }
105
106 private Timestamp updateDt;
107
108
109
110
111
112 public Timestamp getUpdateDt()
113 {
114 return this.updateDt;
115 }
116
117
118
119
120
121 public void setUpdateDt(Timestamp updateDtIn)
122 {
123 this.updateDt = updateDtIn;
124 }
125
126
127 private Department depId;
128
129
130
131
132
133 public Department getDepId()
134 {
135 return this.depId;
136 }
137
138
139
140
141
142 public void setDepId(Department depIdIn)
143 {
144 this.depId = depIdIn;
145 }
146
147 private Quser quserId;
148
149
150
151
152
153 public Quser getQuserId()
154 {
155 return this.quserId;
156 }
157
158
159
160
161
162 public void setQuserId(Quser quserIdIn)
163 {
164 this.quserId = quserIdIn;
165 }
166
167
168
169
170
171 @Override
172 public boolean equals(Object object)
173 {
174 if (this == object)
175 {
176 return true;
177 }
178 if (!(object instanceof MapProject))
179 {
180 return false;
181 }
182 final MapProject that = (MapProject)object;
183 if (this.mapProjectId == null || that.getMapProjectId() == null || !this.mapProjectId.equals(that.getMapProjectId()))
184 {
185 return false;
186 }
187 return true;
188 }
189
190
191
192
193 @Override
194 public int hashCode()
195 {
196 int hashCode = 0;
197 hashCode = 29 * hashCode + (this.mapProjectId == null ? 0 : this.mapProjectId.hashCode());
198
199 return hashCode;
200 }
201
202
203
204
205 public static final class Factory
206 {
207
208
209
210
211 public static MapProject newInstance()
212 {
213 return new MapProjectImpl();
214 }
215
216
217
218
219
220
221
222
223 public static MapProject newInstance(String mapProjectNm, Quser quserId)
224 {
225 final MapProject entity = new MapProjectImpl();
226 entity.setMapProjectNm(mapProjectNm);
227 entity.setQuserId(quserId);
228 return entity;
229 }
230
231
232
233
234
235
236
237
238
239
240
241 public static MapProject newInstance(String mapProjectNm, String mapProjetConfig, Timestamp updateDt, Department depId, Quser quserId)
242 {
243 final MapProject entity = new MapProjectImpl();
244 entity.setMapProjectNm(mapProjectNm);
245 entity.setMapProjetConfig(mapProjetConfig);
246 entity.setUpdateDt(updateDt);
247 entity.setDepId(depId);
248 entity.setQuserId(quserId);
249 return entity;
250 }
251 }
252
253
254
255
256 public int compareTo(MapProject o)
257 {
258 int cmp = 0;
259 if (this.getMapProjectId() != null)
260 {
261 cmp = this.getMapProjectId().compareTo(o.getMapProjectId());
262 }
263 else
264 {
265 if (this.getMapProjectNm() != null)
266 {
267 cmp = (cmp != 0 ? cmp : this.getMapProjectNm().compareTo(o.getMapProjectNm()));
268 }
269 if (this.getMapProjetConfig() != null)
270 {
271 cmp = (cmp != 0 ? cmp : this.getMapProjetConfig().compareTo(o.getMapProjetConfig()));
272 }
273 if (this.getUpdateDt() != null)
274 {
275 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
276 }
277 }
278 return cmp;
279 }
280
281
282 }