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.quadrige3.core.dao.system.context;
7
8 /*-
9 * #%L
10 * Quadrige3 Core :: Client API
11 * %%
12 * Copyright (C) 2017 - 2024 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 import fr.ifremer.quadrige3.core.dao.referential.pmfm.Pmfm;
29 import java.io.Serializable;
30 import java.sql.Timestamp;
31
32 /**
33 *
34 */
35 // HibernateEntity.vsl annotations merge-point
36 public abstract class PmfmContextOrder
37 implements Serializable, Comparable<PmfmContextOrder>
38 {
39 /**
40 * The serial version UID of this class. Needed for serialization.
41 */
42 private static final long serialVersionUID = 5170093576577811409L;
43
44 private PmfmContextOrderPK pmfmContextOrderPk;
45
46 /**
47 * Get the composite primary key identifier class
48 * @return pmfmContextOrderPk
49 */
50 public PmfmContextOrderPK getPmfmContextOrderPk()
51 {
52 return this.pmfmContextOrderPk;
53 }
54
55 /**
56 * Set the composite primary key identifier class
57 * @param pmfmContextOrderPkIn
58 */
59 public void setPmfmContextOrderPk(PmfmContextOrderPK pmfmContextOrderPkIn) {
60 this.pmfmContextOrderPk = pmfmContextOrderPkIn;
61 }
62
63 // Generate 2 attributes
64 private Integer pmfmContextOrderPresRk;
65
66 /**
67 *
68 * @return this.pmfmContextOrderPresRk Integer
69 */
70 public Integer getPmfmContextOrderPresRk()
71 {
72 return this.pmfmContextOrderPresRk;
73 }
74
75 /**
76 *
77 * @param pmfmContextOrderPresRkIn Integer
78 */
79 public void setPmfmContextOrderPresRk(Integer pmfmContextOrderPresRkIn)
80 {
81 this.pmfmContextOrderPresRk = pmfmContextOrderPresRkIn;
82 }
83
84 private Timestamp updateDt;
85
86 /**
87 *
88 * @return this.updateDt Timestamp
89 */
90 public Timestamp getUpdateDt()
91 {
92 return this.updateDt;
93 }
94
95 /**
96 *
97 * @param updateDtIn Timestamp
98 */
99 public void setUpdateDt(Timestamp updateDtIn)
100 {
101 this.updateDt = updateDtIn;
102 }
103
104 // Generate 2 associations
105 private Context context;
106
107 /**
108 * Gestion des contextes utilisateur
109 * @return this.context Context
110 */
111 public Context getContext()
112 {
113 return this.context;
114 }
115
116 /**
117 * Gestion des contextes utilisateur
118 * @param contextIn Context
119 */
120 public void setContext(Context contextIn)
121 {
122 this.context = contextIn;
123 }
124
125 private Pmfm pmfm;
126
127 /**
128 * Liste les quadruplets paramètre, méthode, support, fraction.
129 * @return this.pmfm Pmfm
130 */
131 public Pmfm getPmfm()
132 {
133 return this.pmfm;
134 }
135
136 /**
137 * Liste les quadruplets paramètre, méthode, support, fraction.
138 * @param pmfmIn Pmfm
139 */
140 public void setPmfm(Pmfm pmfmIn)
141 {
142 this.pmfm = pmfmIn;
143 }
144
145 /**
146 * This entity does not have any identifiers
147 * and is not extending any other entity,
148 * so this method will only return <code>true</code> if the argument reference and <code>this</code>
149 * refer to the same object.
150 */
151 @Override
152 public boolean equals(Object object)
153 {
154 return super.equals(object);
155 }
156
157 /**
158 * This entity does not have any identifiers
159 * and is not extending any other entity,
160 * so this method will only take the identifiers of this entity into account when calculating the hash code.
161 */
162 @Override
163 public int hashCode()
164 {
165 return super.hashCode();
166 }
167
168 /**
169 * Constructs new instances of {@link PmfmContextOrder}.
170 */
171 public static final class Factory
172 {
173 /**
174 * Constructs a new instance of {@link PmfmContextOrder}.
175 * @return new PmfmContextOrderImpl()
176 */
177 public static PmfmContextOrder newInstance()
178 {
179 return new PmfmContextOrderImpl();
180 }
181
182 /**
183 * Constructs a new instance of {@link PmfmContextOrder}, taking all required and/or
184 * read-only properties as arguments, except for identifiers.
185 * @param context Context
186 * @param pmfm Pmfm
187 * @return newInstance
188 */
189 public static PmfmContextOrder newInstance(Context context, Pmfm pmfm)
190 {
191 final PmfmContextOrder entity = new PmfmContextOrderImpl();
192 entity.setContext(context);
193 entity.setPmfm(pmfm);
194 return entity;
195 }
196
197 /**
198 * Constructs a new instance of {@link PmfmContextOrder}, taking all possible properties
199 * (except the identifier(s))as arguments.
200 * @param pmfmContextOrderPresRk Integer
201 * @param updateDt Timestamp
202 * @param context Context
203 * @param pmfm Pmfm
204 * @return newInstance PmfmContextOrder
205 */
206 public static PmfmContextOrder newInstance(Integer pmfmContextOrderPresRk, Timestamp updateDt, Context context, Pmfm pmfm)
207 {
208 final PmfmContextOrder entity = new PmfmContextOrderImpl();
209 entity.setPmfmContextOrderPresRk(pmfmContextOrderPresRk);
210 entity.setUpdateDt(updateDt);
211 entity.setContext(context);
212 entity.setPmfm(pmfm);
213 return entity;
214 }
215 }
216
217 /**
218 * @see Comparable#compareTo
219 */
220 public int compareTo(PmfmContextOrder o)
221 {
222 int cmp = 0;
223 if (this.getPmfmContextOrderPk() != null)
224 {
225 cmp = this.getPmfmContextOrderPk().compareTo(o.getPmfmContextOrderPk());
226 }
227 if (this.getPmfmContextOrderPresRk() != null)
228 {
229 cmp = (cmp != 0 ? cmp : this.getPmfmContextOrderPresRk().compareTo(o.getPmfmContextOrderPresRk()));
230 }
231 if (this.getUpdateDt() != null)
232 {
233 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
234 }
235 return cmp;
236 }
237 // HibernateEntity.vsl merge-point
238 // PmfmContextOrder.java merge-point
239 }