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