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.referential.monitoringLocation.MonitoringLocation;
29 import fr.ifremer.quadrige3.core.dao.referential.monitoringLocation.PositionningSystem;
30 import java.io.Serializable;
31 import java.sql.Timestamp;
32
33
34
35
36
37 public abstract class MonLocHisGeom
38 implements Serializable, Comparable<MonLocHisGeom>
39 {
40
41
42
43 private static final long serialVersionUID = 3803139124304035734L;
44
45
46 private Integer monLocHisGeomId;
47
48
49
50
51
52 public Integer getMonLocHisGeomId()
53 {
54 return this.monLocHisGeomId;
55 }
56
57
58
59
60
61 public void setMonLocHisGeomId(Integer monLocHisGeomIdIn)
62 {
63 this.monLocHisGeomId = monLocHisGeomIdIn;
64 }
65
66 private String monLocPosition;
67
68
69
70
71
72 public String getMonLocPosition()
73 {
74 return this.monLocPosition;
75 }
76
77
78
79
80
81 public void setMonLocPosition(String monLocPositionIn)
82 {
83 this.monLocPosition = monLocPositionIn;
84 }
85
86 private Timestamp updateDt;
87
88
89
90
91
92 public Timestamp getUpdateDt()
93 {
94 return this.updateDt;
95 }
96
97
98
99
100
101 public void setUpdateDt(Timestamp updateDtIn)
102 {
103 this.updateDt = updateDtIn;
104 }
105
106
107 private PositionningSystem posSystemId;
108
109
110
111
112
113 public PositionningSystem getPosSystemId()
114 {
115 return this.posSystemId;
116 }
117
118
119
120
121
122 public void setPosSystemId(PositionningSystem posSystemIdIn)
123 {
124 this.posSystemId = posSystemIdIn;
125 }
126
127 private MonitoringLocation monitoringLocation;
128
129
130
131
132
133 public MonitoringLocation getMonitoringLocation()
134 {
135 return this.monitoringLocation;
136 }
137
138
139
140
141
142 public void setMonitoringLocation(MonitoringLocation monitoringLocationIn)
143 {
144 this.monitoringLocation = monitoringLocationIn;
145 }
146
147
148
149
150
151 @Override
152 public boolean equals(Object object)
153 {
154 if (this == object)
155 {
156 return true;
157 }
158 if (!(object instanceof MonLocHisGeom))
159 {
160 return false;
161 }
162 final MonLocHisGeom that = (MonLocHisGeom)object;
163 if (this.monLocHisGeomId == null || that.getMonLocHisGeomId() == null || !this.monLocHisGeomId.equals(that.getMonLocHisGeomId()))
164 {
165 return false;
166 }
167 return true;
168 }
169
170
171
172
173 @Override
174 public int hashCode()
175 {
176 int hashCode = 0;
177 hashCode = 29 * hashCode + (this.monLocHisGeomId == null ? 0 : this.monLocHisGeomId.hashCode());
178
179 return hashCode;
180 }
181
182
183
184
185 public static final class Factory
186 {
187
188
189
190
191 public static MonLocHisGeom newInstance()
192 {
193 return new MonLocHisGeomImpl();
194 }
195
196
197
198
199
200
201
202
203
204 public static MonLocHisGeom newInstance(String monLocPosition, PositionningSystem posSystemId, MonitoringLocation monitoringLocation)
205 {
206 final MonLocHisGeom entity = new MonLocHisGeomImpl();
207 entity.setMonLocPosition(monLocPosition);
208 entity.setPosSystemId(posSystemId);
209 entity.setMonitoringLocation(monitoringLocation);
210 return entity;
211 }
212
213
214
215
216
217
218
219
220
221
222 public static MonLocHisGeom newInstance(String monLocPosition, Timestamp updateDt, PositionningSystem posSystemId, MonitoringLocation monitoringLocation)
223 {
224 final MonLocHisGeom entity = new MonLocHisGeomImpl();
225 entity.setMonLocPosition(monLocPosition);
226 entity.setUpdateDt(updateDt);
227 entity.setPosSystemId(posSystemId);
228 entity.setMonitoringLocation(monitoringLocation);
229 return entity;
230 }
231 }
232
233
234
235
236 public int compareTo(MonLocHisGeom o)
237 {
238 int cmp = 0;
239 if (this.getMonLocHisGeomId() != null)
240 {
241 cmp = this.getMonLocHisGeomId().compareTo(o.getMonLocHisGeomId());
242 }
243 else
244 {
245 if (this.getMonLocPosition() != null)
246 {
247 cmp = (cmp != 0 ? cmp : this.getMonLocPosition().compareTo(o.getMonLocPosition()));
248 }
249 if (this.getUpdateDt() != null)
250 {
251 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
252 }
253 }
254 return cmp;
255 }
256
257
258 }