1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.data.aquaculture;
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.Status;
30 import java.io.Serializable;
31 import java.sql.Timestamp;
32
33
34
35
36
37 public abstract class AgeGroup
38 implements Serializable, Comparable<AgeGroup>
39 {
40
41
42
43 private static final long serialVersionUID = -818363897210850022L;
44
45
46 private String ageGroupCd;
47
48
49
50
51
52 public String getAgeGroupCd()
53 {
54 return this.ageGroupCd;
55 }
56
57
58
59
60
61 public void setAgeGroupCd(String ageGroupCdIn)
62 {
63 this.ageGroupCd = ageGroupCdIn;
64 }
65
66 private String ageGroupNm;
67
68
69
70
71
72 public String getAgeGroupNm()
73 {
74 return this.ageGroupNm;
75 }
76
77
78
79
80
81 public void setAgeGroupNm(String ageGroupNmIn)
82 {
83 this.ageGroupNm = ageGroupNmIn;
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 Status status;
108
109
110
111
112
113 public Status getStatus()
114 {
115 return this.status;
116 }
117
118
119
120
121
122 public void setStatus(Status statusIn)
123 {
124 this.status = statusIn;
125 }
126
127
128
129
130
131 @Override
132 public boolean equals(Object object)
133 {
134 if (this == object)
135 {
136 return true;
137 }
138 if (!(object instanceof AgeGroup))
139 {
140 return false;
141 }
142 final AgeGroup that = (AgeGroup)object;
143 if (this.ageGroupCd == null || that.getAgeGroupCd() == null || !this.ageGroupCd.equals(that.getAgeGroupCd()))
144 {
145 return false;
146 }
147 return true;
148 }
149
150
151
152
153 @Override
154 public int hashCode()
155 {
156 int hashCode = 0;
157 hashCode = 29 * hashCode + (this.ageGroupCd == null ? 0 : this.ageGroupCd.hashCode());
158
159 return hashCode;
160 }
161
162
163
164
165 public static final class Factory
166 {
167
168
169
170
171 public static AgeGroup newInstance()
172 {
173 return new AgeGroupImpl();
174 }
175
176
177
178
179
180
181
182
183
184
185 public static AgeGroup newInstance(String ageGroupNm, Timestamp updateDt, Status status)
186 {
187 final AgeGroup entity = new AgeGroupImpl();
188 entity.setAgeGroupNm(ageGroupNm);
189 entity.setUpdateDt(updateDt);
190 entity.setStatus(status);
191 return entity;
192 }
193 }
194
195
196
197
198 public int compareTo(AgeGroup o)
199 {
200 int cmp = 0;
201 if (this.getAgeGroupCd() != null)
202 {
203 cmp = this.getAgeGroupCd().compareTo(o.getAgeGroupCd());
204 }
205 else
206 {
207 if (this.getAgeGroupNm() != null)
208 {
209 cmp = (cmp != 0 ? cmp : this.getAgeGroupNm().compareTo(o.getAgeGroupNm()));
210 }
211 if (this.getUpdateDt() != null)
212 {
213 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
214 }
215 }
216 return cmp;
217 }
218
219
220 }