1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.sandre;
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 import fr.ifremer.quadrige2.core.dao.referential.taxon.TaxonomicLevel;
30 import java.io.Serializable;
31
32
33
34
35
36 public abstract class SandreTaxonomicLevelImp
37 implements Serializable, Comparable<SandreTaxonomicLevelImp>
38 {
39
40
41
42 private static final long serialVersionUID = -4412297017312863444L;
43
44
45 private Integer sandreTaxLevelId;
46
47
48
49
50
51 public Integer getSandreTaxLevelId()
52 {
53 return this.sandreTaxLevelId;
54 }
55
56
57
58
59
60 public void setSandreTaxLevelId(Integer sandreTaxLevelIdIn)
61 {
62 this.sandreTaxLevelId = sandreTaxLevelIdIn;
63 }
64
65 private String sandreTaxLevelLb;
66
67
68
69
70
71 public String getSandreTaxLevelLb()
72 {
73 return this.sandreTaxLevelLb;
74 }
75
76
77
78
79
80 public void setSandreTaxLevelLb(String sandreTaxLevelLbIn)
81 {
82 this.sandreTaxLevelLb = sandreTaxLevelLbIn;
83 }
84
85 private Integer sandreTaxonomicLevelImpId;
86
87
88
89
90
91 public Integer getSandreTaxonomicLevelImpId()
92 {
93 return this.sandreTaxonomicLevelImpId;
94 }
95
96
97
98
99
100 public void setSandreTaxonomicLevelImpId(Integer sandreTaxonomicLevelImpIdIn)
101 {
102 this.sandreTaxonomicLevelImpId = sandreTaxonomicLevelImpIdIn;
103 }
104
105
106 private TaxonomicLevel taxLevelCd;
107
108
109
110
111
112 public TaxonomicLevel getTaxLevelCd()
113 {
114 return this.taxLevelCd;
115 }
116
117
118
119
120
121 public void setTaxLevelCd(TaxonomicLevel taxLevelCdIn)
122 {
123 this.taxLevelCd = taxLevelCdIn;
124 }
125
126
127
128
129
130 @Override
131 public boolean equals(Object object)
132 {
133 if (this == object)
134 {
135 return true;
136 }
137 if (!(object instanceof SandreTaxonomicLevelImp))
138 {
139 return false;
140 }
141 final SandreTaxonomicLevelImp that = (SandreTaxonomicLevelImp)object;
142 if (this.sandreTaxonomicLevelImpId == null || that.getSandreTaxonomicLevelImpId() == null || !this.sandreTaxonomicLevelImpId.equals(that.getSandreTaxonomicLevelImpId()))
143 {
144 return false;
145 }
146 return true;
147 }
148
149
150
151
152 @Override
153 public int hashCode()
154 {
155 int hashCode = 0;
156 hashCode = 29 * hashCode + (this.sandreTaxonomicLevelImpId == null ? 0 : this.sandreTaxonomicLevelImpId.hashCode());
157
158 return hashCode;
159 }
160
161
162
163
164 public static final class Factory
165 {
166
167
168
169
170 public static SandreTaxonomicLevelImp newInstance()
171 {
172 return new SandreTaxonomicLevelImpImpl();
173 }
174
175
176
177
178
179
180
181
182 public static SandreTaxonomicLevelImp newInstance(Integer sandreTaxLevelId, TaxonomicLevel taxLevelCd)
183 {
184 final SandreTaxonomicLevelImp entity = new SandreTaxonomicLevelImpImpl();
185 entity.setSandreTaxLevelId(sandreTaxLevelId);
186 entity.setTaxLevelCd(taxLevelCd);
187 return entity;
188 }
189
190
191
192
193
194
195
196
197
198 public static SandreTaxonomicLevelImp newInstance(Integer sandreTaxLevelId, String sandreTaxLevelLb, TaxonomicLevel taxLevelCd)
199 {
200 final SandreTaxonomicLevelImp entity = new SandreTaxonomicLevelImpImpl();
201 entity.setSandreTaxLevelId(sandreTaxLevelId);
202 entity.setSandreTaxLevelLb(sandreTaxLevelLb);
203 entity.setTaxLevelCd(taxLevelCd);
204 return entity;
205 }
206 }
207
208
209
210
211 public int compareTo(SandreTaxonomicLevelImp o)
212 {
213 int cmp = 0;
214 if (this.getSandreTaxonomicLevelImpId() != null)
215 {
216 cmp = this.getSandreTaxonomicLevelImpId().compareTo(o.getSandreTaxonomicLevelImpId());
217 }
218 else
219 {
220 if (this.getSandreTaxLevelId() != null)
221 {
222 cmp = (cmp != 0 ? cmp : this.getSandreTaxLevelId().compareTo(o.getSandreTaxLevelId()));
223 }
224 if (this.getSandreTaxLevelLb() != null)
225 {
226 cmp = (cmp != 0 ? cmp : this.getSandreTaxLevelLb().compareTo(o.getSandreTaxLevelLb()));
227 }
228 }
229 return cmp;
230 }
231
232
233 }