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.program;
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.Quser;
30 import java.io.Serializable;
31 import java.sql.Timestamp;
32
33 /**
34 * Liste des droits d'un utilisateur pour un programme particulier.
35 */
36 // HibernateEntity.vsl annotations merge-point
37 public abstract class ProgQuserProgPriv
38 implements Serializable, Comparable<ProgQuserProgPriv>
39 {
40 /**
41 * The serial version UID of this class. Needed for serialization.
42 */
43 private static final long serialVersionUID = 888549131131693469L;
44
45 private ProgQuserProgPrivPK progQuserProgPrivPk;
46
47 /**
48 * Get the composite primary key identifier class
49 * @return progQuserProgPrivPk
50 */
51 public ProgQuserProgPrivPK getProgQuserProgPrivPk()
52 {
53 return this.progQuserProgPrivPk;
54 }
55
56 /**
57 * Set the composite primary key identifier class
58 * @param progQuserProgPrivPkIn
59 */
60 public void setProgQuserProgPrivPk(ProgQuserProgPrivPK progQuserProgPrivPkIn) {
61 this.progQuserProgPrivPk = progQuserProgPrivPkIn;
62 }
63
64 // Generate 1 attributes
65 private Timestamp updateDt;
66
67 /**
68 * Date de modification de l'objet, mise à jour par le système
69 * @return this.updateDt Timestamp
70 */
71 public Timestamp getUpdateDt()
72 {
73 return this.updateDt;
74 }
75
76 /**
77 * Date de modification de l'objet, mise à jour par le système
78 * @param updateDtIn Timestamp
79 */
80 public void setUpdateDt(Timestamp updateDtIn)
81 {
82 this.updateDt = updateDtIn;
83 }
84
85 // Generate 3 associations
86 private Program program;
87
88 /**
89 * Activités à l'origine de la collecte d'un ensemble cohérent de données.
90 * @return this.program Program
91 */
92 public Program getProgram()
93 {
94 return this.program;
95 }
96
97 /**
98 * Activités à l'origine de la collecte d'un ensemble cohérent de données.
99 * @param programIn Program
100 */
101 public void setProgram(Program programIn)
102 {
103 this.program = programIn;
104 }
105
106 private Quser quser;
107
108 /**
109 * Liste l'ensemble des agents et utilisateurs du système.
110 * @return this.quser Quser
111 */
112 public Quser getQuser()
113 {
114 return this.quser;
115 }
116
117 /**
118 * Liste l'ensemble des agents et utilisateurs du système.
119 * @param quserIn Quser
120 */
121 public void setQuser(Quser quserIn)
122 {
123 this.quser = quserIn;
124 }
125
126 private ProgramPrivilege programPrivilege;
127
128 /**
129 * types de privilège applicables sur un programme (responsable, consultation intégrale,
130 * saisisseur)
131 * @return this.programPrivilege ProgramPrivilege
132 */
133 public ProgramPrivilege getProgramPrivilege()
134 {
135 return this.programPrivilege;
136 }
137
138 /**
139 * types de privilège applicables sur un programme (responsable, consultation intégrale,
140 * saisisseur)
141 * @param programPrivilegeIn ProgramPrivilege
142 */
143 public void setProgramPrivilege(ProgramPrivilege programPrivilegeIn)
144 {
145 this.programPrivilege = programPrivilegeIn;
146 }
147
148 /**
149 * This entity does not have any identifiers
150 * and is not extending any other entity,
151 * so this method will only return <code>true</code> if the argument reference and <code>this</code>
152 * refer to the same object.
153 */
154 @Override
155 public boolean equals(Object object)
156 {
157 return super.equals(object);
158 }
159
160 /**
161 * This entity does not have any identifiers
162 * and is not extending any other entity,
163 * so this method will only take the identifiers of this entity into account when calculating the hash code.
164 */
165 @Override
166 public int hashCode()
167 {
168 return super.hashCode();
169 }
170
171 /**
172 * Constructs new instances of {@link ProgQuserProgPriv}.
173 */
174 public static final class Factory
175 {
176 /**
177 * Constructs a new instance of {@link ProgQuserProgPriv}.
178 * @return new ProgQuserProgPrivImpl()
179 */
180 public static ProgQuserProgPriv newInstance()
181 {
182 return new ProgQuserProgPrivImpl();
183 }
184
185
186 /**
187 * Constructs a new instance of {@link ProgQuserProgPriv}, taking all possible properties
188 * (except the identifier(s))as arguments.
189 * @param updateDt Timestamp
190 * @param program Program
191 * @param quser Quser
192 * @param programPrivilege ProgramPrivilege
193 * @return newInstance ProgQuserProgPriv
194 */
195 public static ProgQuserProgPriv newInstance(Timestamp updateDt, Program program, Quser quser, ProgramPrivilege programPrivilege)
196 {
197 final ProgQuserProgPriv entity = new ProgQuserProgPrivImpl();
198 entity.setUpdateDt(updateDt);
199 entity.setProgram(program);
200 entity.setQuser(quser);
201 entity.setProgramPrivilege(programPrivilege);
202 return entity;
203 }
204 }
205
206 /**
207 * @see Comparable#compareTo
208 */
209 public int compareTo(ProgQuserProgPriv o)
210 {
211 int cmp = 0;
212 if (this.getProgQuserProgPrivPk() != null)
213 {
214 cmp = this.getProgQuserProgPrivPk().compareTo(o.getProgQuserProgPrivPk());
215 }
216 if (this.getUpdateDt() != null)
217 {
218 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
219 }
220 return cmp;
221 }
222 // HibernateEntity.vsl merge-point
223 // ProgQuserProgPriv.java merge-point
224 }