1
2
3
4
5
6 package fr.ifremer.quadrige2.core.dao.administration.strategy;
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.administration.user.Department;
30 import fr.ifremer.quadrige2.core.dao.referential.AnalysisInstrument;
31 import java.io.Serializable;
32 import java.sql.Timestamp;
33
34
35
36
37
38 public abstract class PmfmAppliedStrategy
39 implements Serializable, Comparable<PmfmAppliedStrategy>
40 {
41
42
43
44 private static final long serialVersionUID = -1991543001677708973L;
45
46 private PmfmAppliedStrategyPK pmfmAppliedStrategyPk;
47
48
49
50
51
52 public PmfmAppliedStrategyPK getPmfmAppliedStrategyPk()
53 {
54 return this.pmfmAppliedStrategyPk;
55 }
56
57
58
59
60
61 public void setPmfmAppliedStrategyPk(PmfmAppliedStrategyPK pmfmAppliedStrategyPkIn) {
62 this.pmfmAppliedStrategyPk = pmfmAppliedStrategyPkIn;
63 }
64
65
66 private Timestamp updateDt;
67
68
69
70
71
72 public Timestamp getUpdateDt()
73 {
74 return this.updateDt;
75 }
76
77
78
79
80
81 public void setUpdateDt(Timestamp updateDtIn)
82 {
83 this.updateDt = updateDtIn;
84 }
85
86
87 private Department department;
88
89
90
91
92
93 public Department getDepartment()
94 {
95 return this.department;
96 }
97
98
99
100
101
102 public void setDepartment(Department departmentIn)
103 {
104 this.department = departmentIn;
105 }
106
107 private AnalysisInstrument analysisInstrument;
108
109
110
111
112
113 public AnalysisInstrument getAnalysisInstrument()
114 {
115 return this.analysisInstrument;
116 }
117
118
119
120
121
122 public void setAnalysisInstrument(AnalysisInstrument analysisInstrumentIn)
123 {
124 this.analysisInstrument = analysisInstrumentIn;
125 }
126
127 private PmfmStrategy pmfmStrategy;
128
129
130
131
132
133
134 public PmfmStrategy getPmfmStrategy()
135 {
136 return this.pmfmStrategy;
137 }
138
139
140
141
142
143
144 public void setPmfmStrategy(PmfmStrategy pmfmStrategyIn)
145 {
146 this.pmfmStrategy = pmfmStrategyIn;
147 }
148
149 private AppliedStrategy appliedStrategy;
150
151
152
153
154
155 public AppliedStrategy getAppliedStrategy()
156 {
157 return this.appliedStrategy;
158 }
159
160
161
162
163
164 public void setAppliedStrategy(AppliedStrategy appliedStrategyIn)
165 {
166 this.appliedStrategy = appliedStrategyIn;
167 }
168
169
170
171
172
173
174
175 @Override
176 public boolean equals(Object object)
177 {
178 return super.equals(object);
179 }
180
181
182
183
184
185
186 @Override
187 public int hashCode()
188 {
189 return super.hashCode();
190 }
191
192
193
194
195 public static final class Factory
196 {
197
198
199
200
201 public static PmfmAppliedStrategy newInstance()
202 {
203 return new PmfmAppliedStrategyImpl();
204 }
205
206
207
208
209
210
211
212
213
214 public static PmfmAppliedStrategy newInstance(Timestamp updateDt, PmfmStrategy pmfmStrategy, AppliedStrategy appliedStrategy)
215 {
216 final PmfmAppliedStrategy entity = new PmfmAppliedStrategyImpl();
217 entity.setUpdateDt(updateDt);
218 entity.setPmfmStrategy(pmfmStrategy);
219 entity.setAppliedStrategy(appliedStrategy);
220 return entity;
221 }
222
223
224
225
226
227
228
229
230
231
232
233 public static PmfmAppliedStrategy newInstance(Timestamp updateDt, Department department, AnalysisInstrument analysisInstrument, PmfmStrategy pmfmStrategy, AppliedStrategy appliedStrategy)
234 {
235 final PmfmAppliedStrategy entity = new PmfmAppliedStrategyImpl();
236 entity.setUpdateDt(updateDt);
237 entity.setDepartment(department);
238 entity.setAnalysisInstrument(analysisInstrument);
239 entity.setPmfmStrategy(pmfmStrategy);
240 entity.setAppliedStrategy(appliedStrategy);
241 return entity;
242 }
243 }
244
245
246
247
248 public int compareTo(PmfmAppliedStrategy o)
249 {
250 int cmp = 0;
251 if (this.getPmfmAppliedStrategyPk() != null)
252 {
253 cmp = this.getPmfmAppliedStrategyPk().compareTo(o.getPmfmAppliedStrategyPk());
254 }
255 if (this.getUpdateDt() != null)
256 {
257 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
258 }
259 return cmp;
260 }
261
262
263 }