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