1
2
3
4
5
6 package fr.ifremer.quadrige2.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
29 import java.io.Serializable;
30 import java.sql.Timestamp;
31
32
33
34
35
36 public abstract class CompliantOs
37 implements Serializable, Comparable<CompliantOs>
38 {
39
40
41
42 private static final long serialVersionUID = -8180059064847543628L;
43
44
45 private String compliantOsCd;
46
47
48
49
50
51 public String getCompliantOsCd()
52 {
53 return this.compliantOsCd;
54 }
55
56
57
58
59
60 public void setCompliantOsCd(String compliantOsCdIn)
61 {
62 this.compliantOsCd = compliantOsCdIn;
63 }
64
65 private String compliantOsNm;
66
67
68
69
70
71 public String getCompliantOsNm()
72 {
73 return this.compliantOsNm;
74 }
75
76
77
78
79
80 public void setCompliantOsNm(String compliantOsNmIn)
81 {
82 this.compliantOsNm = compliantOsNmIn;
83 }
84
85 private Timestamp updateDt;
86
87
88
89
90
91 public Timestamp getUpdateDt()
92 {
93 return this.updateDt;
94 }
95
96
97
98
99
100 public void setUpdateDt(Timestamp updateDtIn)
101 {
102 this.updateDt = updateDtIn;
103 }
104
105
106
107
108
109
110 @Override
111 public boolean equals(Object object)
112 {
113 if (this == object)
114 {
115 return true;
116 }
117 if (!(object instanceof CompliantOs))
118 {
119 return false;
120 }
121 final CompliantOs that = (CompliantOs)object;
122 if (this.compliantOsCd == null || that.getCompliantOsCd() == null || !this.compliantOsCd.equals(that.getCompliantOsCd()))
123 {
124 return false;
125 }
126 return true;
127 }
128
129
130
131
132 @Override
133 public int hashCode()
134 {
135 int hashCode = 0;
136 hashCode = 29 * hashCode + (this.compliantOsCd == null ? 0 : this.compliantOsCd.hashCode());
137
138 return hashCode;
139 }
140
141
142
143
144 public static final class Factory
145 {
146
147
148
149
150 public static CompliantOs newInstance()
151 {
152 return new CompliantOsImpl();
153 }
154
155
156
157
158
159
160
161
162
163 public static CompliantOs newInstance(String compliantOsNm, Timestamp updateDt)
164 {
165 final CompliantOs entity = new CompliantOsImpl();
166 entity.setCompliantOsNm(compliantOsNm);
167 entity.setUpdateDt(updateDt);
168 return entity;
169 }
170 }
171
172
173
174
175 public int compareTo(CompliantOs o)
176 {
177 int cmp = 0;
178 if (this.getCompliantOsCd() != null)
179 {
180 cmp = this.getCompliantOsCd().compareTo(o.getCompliantOsCd());
181 }
182 else
183 {
184 if (this.getCompliantOsNm() != null)
185 {
186 cmp = (cmp != 0 ? cmp : this.getCompliantOsNm().compareTo(o.getCompliantOsNm()));
187 }
188 if (this.getUpdateDt() != null)
189 {
190 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
191 }
192 }
193 return cmp;
194 }
195
196
197 }