1 // license-header java merge-point
2 //
3 // Attention: Generated code! Do not modify by hand!
4 // Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge.
5 //
6 package fr.ifremer.quadrige2.core.dao.administration.strategy;
7
8 /*-
9 * #%L
10 * Quadrige2 Core :: Server API
11 * %%
12 * Copyright (C) 2017 Ifremer
13 * %%
14 * This program is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Affero General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU Affero General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 * #L%
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 * PMSF associés à une stratégie pour un lieu données.
36 */
37 // HibernateEntity.vsl annotations merge-point
38 public abstract class PmfmAppliedStrategy
39 implements Serializable, Comparable<PmfmAppliedStrategy>
40 {
41 /**
42 * The serial version UID of this class. Needed for serialization.
43 */
44 private static final long serialVersionUID = -1991543001677708973L;
45
46 private PmfmAppliedStrategyPK pmfmAppliedStrategyPk;
47
48 /**
49 * Get the composite primary key identifier class
50 * @return pmfmAppliedStrategyPk
51 */
52 public PmfmAppliedStrategyPK getPmfmAppliedStrategyPk()
53 {
54 return this.pmfmAppliedStrategyPk;
55 }
56
57 /**
58 * Set the composite primary key identifier class
59 * @param pmfmAppliedStrategyPkIn
60 */
61 public void setPmfmAppliedStrategyPk(PmfmAppliedStrategyPK pmfmAppliedStrategyPkIn) {
62 this.pmfmAppliedStrategyPk = pmfmAppliedStrategyPkIn;
63 }
64
65 // Generate 1 attributes
66 private Timestamp updateDt;
67
68 /**
69 * Date de modification de l'objet, mise à jour par le système
70 * @return this.updateDt Timestamp
71 */
72 public Timestamp getUpdateDt()
73 {
74 return this.updateDt;
75 }
76
77 /**
78 * Date de modification de l'objet, mise à jour par le système
79 * @param updateDtIn Timestamp
80 */
81 public void setUpdateDt(Timestamp updateDtIn)
82 {
83 this.updateDt = updateDtIn;
84 }
85
86 // Generate 4 associations
87 private Department department;
88
89 /**
90 * Liste les départements ou services auxquels sont rattachés les agents
91 * @return this.department Department
92 */
93 public Department getDepartment()
94 {
95 return this.department;
96 }
97
98 /**
99 * Liste les départements ou services auxquels sont rattachés les agents
100 * @param departmentIn Department
101 */
102 public void setDepartment(Department departmentIn)
103 {
104 this.department = departmentIn;
105 }
106
107 private AnalysisInstrument analysisInstrument;
108
109 /**
110 * Liste les engins d'analyse ou de prélèvement (au sens marque/modèle et non numéro de série).
111 * @return this.analysisInstrument AnalysisInstrument
112 */
113 public AnalysisInstrument getAnalysisInstrument()
114 {
115 return this.analysisInstrument;
116 }
117
118 /**
119 * Liste les engins d'analyse ou de prélèvement (au sens marque/modèle et non numéro de série).
120 * @param analysisInstrumentIn AnalysisInstrument
121 */
122 public void setAnalysisInstrument(AnalysisInstrument analysisInstrumentIn)
123 {
124 this.analysisInstrument = analysisInstrumentIn;
125 }
126
127 private PmfmStrategy pmfmStrategy;
128
129 /**
130 * PSFM associés à une stratégie
131 * PMSF associés à une stratégie.
132 * @return this.pmfmStrategy PmfmStrategy
133 */
134 public PmfmStrategy getPmfmStrategy()
135 {
136 return this.pmfmStrategy;
137 }
138
139 /**
140 * PSFM associés à une stratégie
141 * PMSF associés à une stratégie.
142 * @param pmfmStrategyIn PmfmStrategy
143 */
144 public void setPmfmStrategy(PmfmStrategy pmfmStrategyIn)
145 {
146 this.pmfmStrategy = pmfmStrategyIn;
147 }
148
149 private AppliedStrategy appliedStrategy;
150
151 /**
152 * Identifie les conditions d'application locale de la stratégie pour une période donnée.
153 * @return this.appliedStrategy AppliedStrategy
154 */
155 public AppliedStrategy getAppliedStrategy()
156 {
157 return this.appliedStrategy;
158 }
159
160 /**
161 * Identifie les conditions d'application locale de la stratégie pour une période donnée.
162 * @param appliedStrategyIn AppliedStrategy
163 */
164 public void setAppliedStrategy(AppliedStrategy appliedStrategyIn)
165 {
166 this.appliedStrategy = appliedStrategyIn;
167 }
168
169 /**
170 * This entity does not have any identifiers
171 * and is not extending any other entity,
172 * so this method will only return <code>true</code> if the argument reference and <code>this</code>
173 * refer to the same object.
174 */
175 @Override
176 public boolean equals(Object object)
177 {
178 return super.equals(object);
179 }
180
181 /**
182 * This entity does not have any identifiers
183 * and is not extending any other entity,
184 * so this method will only take the identifiers of this entity into account when calculating the hash code.
185 */
186 @Override
187 public int hashCode()
188 {
189 return super.hashCode();
190 }
191
192 /**
193 * Constructs new instances of {@link PmfmAppliedStrategy}.
194 */
195 public static final class Factory
196 {
197 /**
198 * Constructs a new instance of {@link PmfmAppliedStrategy}.
199 * @return new PmfmAppliedStrategyImpl()
200 */
201 public static PmfmAppliedStrategy newInstance()
202 {
203 return new PmfmAppliedStrategyImpl();
204 }
205
206 /**
207 * Constructs a new instance of {@link PmfmAppliedStrategy}, taking all required and/or
208 * read-only properties as arguments, except for identifiers.
209 * @param updateDt Timestamp
210 * @param pmfmStrategy PmfmStrategy
211 * @param appliedStrategy AppliedStrategy
212 * @return newInstance
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 * Constructs a new instance of {@link PmfmAppliedStrategy}, taking all possible properties
225 * (except the identifier(s))as arguments.
226 * @param updateDt Timestamp
227 * @param department Department
228 * @param analysisInstrument AnalysisInstrument
229 * @param pmfmStrategy PmfmStrategy
230 * @param appliedStrategy AppliedStrategy
231 * @return newInstance PmfmAppliedStrategy
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 * @see Comparable#compareTo
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 // HibernateEntity.vsl merge-point
262 // PmfmAppliedStrategy.java merge-point
263 }