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.quadrige3.core.dao.referential.pmfm;
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 java.io.Serializable;
29  import java.sql.Timestamp;
30  
31  /**
32   * Liste des valeurs qualitatives pour un PSFM.
33   * Sous-liste des valeurs qualitatives d'un paramètre
34   */
35  // HibernateEntity.vsl annotations merge-point
36  public abstract class PmfmQualValue
37      implements Serializable, Comparable<PmfmQualValue>
38  {
39      /**
40       * The serial version UID of this class. Needed for serialization.
41       */
42      private static final long serialVersionUID = -6004491336635439074L;
43  
44      private PmfmQualValuePK pmfmQualValuePk;
45  
46      /**
47       * Get the composite primary key identifier class
48       * @return pmfmQualValuePk
49       */
50      public PmfmQualValuePK getPmfmQualValuePk()
51      {
52          return this.pmfmQualValuePk;
53      }
54  
55      /**
56       * Set the composite primary key identifier class
57       * @param pmfmQualValuePkIn
58       */
59      public void setPmfmQualValuePk(PmfmQualValuePK pmfmQualValuePkIn) {
60          this.pmfmQualValuePk = pmfmQualValuePkIn;
61      }
62  
63      // Generate 1 attributes
64      private Timestamp updateDt;
65  
66      /**
67       * Date de modification de l'objet, mise à jour par le système
68       * @return this.updateDt Timestamp
69       */
70      public Timestamp getUpdateDt()
71      {
72          return this.updateDt;
73      }
74  
75      /**
76       * Date de modification de l'objet, mise à jour par le système
77       * @param updateDtIn Timestamp
78       */
79      public void setUpdateDt(Timestamp updateDtIn)
80      {
81          this.updateDt = updateDtIn;
82      }
83  
84      // Generate 2 associations
85      private QualitativeValue qualitativeValue;
86  
87      /**
88       * Liste des valeurs qualitatives associées aux paramètres.
89       * @return this.qualitativeValue QualitativeValue
90       */
91      public QualitativeValue getQualitativeValue()
92      {
93          return this.qualitativeValue;
94      }
95  
96      /**
97       * Liste des valeurs qualitatives associées aux paramètres.
98       * @param qualitativeValueIn QualitativeValue
99       */
100     public void setQualitativeValue(QualitativeValue qualitativeValueIn)
101     {
102         this.qualitativeValue = qualitativeValueIn;
103     }
104 
105     private Pmfm pmfm;
106 
107     /**
108      * Liste les quadruplets paramètre, méthode, support, fraction.
109      * @return this.pmfm Pmfm
110      */
111     public Pmfm getPmfm()
112     {
113         return this.pmfm;
114     }
115 
116     /**
117      * Liste les quadruplets paramètre, méthode, support, fraction.
118      * @param pmfmIn Pmfm
119      */
120     public void setPmfm(Pmfm pmfmIn)
121     {
122         this.pmfm = pmfmIn;
123     }
124 
125     /**
126      * This entity does not have any identifiers
127      * and is not extending any other entity,
128      * so this method will only return <code>true</code> if the argument reference and <code>this</code>
129      * refer to the same object.
130      */
131     @Override
132     public boolean equals(Object object)
133     {
134         return super.equals(object);
135     }
136 
137     /**
138      * This entity does not have any identifiers
139      * and is not extending any other entity,
140      * so this method will only take the identifiers of this entity into account when calculating the hash code.
141      */
142     @Override
143     public int hashCode()
144     {
145         return super.hashCode();
146     }
147 
148     /**
149      * Constructs new instances of {@link PmfmQualValue}.
150      */
151     public static final class Factory
152     {
153         /**
154          * Constructs a new instance of {@link PmfmQualValue}.
155          * @return new PmfmQualValueImpl()
156          */
157         public static PmfmQualValue newInstance()
158         {
159             return new PmfmQualValueImpl();
160         }
161 
162         /**
163          * Constructs a new instance of {@link PmfmQualValue}, taking all required and/or
164          * read-only properties as arguments, except for identifiers.
165          * @param qualitativeValue QualitativeValue
166          * @param pmfm Pmfm
167          * @return newInstance
168          */
169         public static PmfmQualValue newInstance(QualitativeValue qualitativeValue, Pmfm pmfm)
170         {
171             final PmfmQualValue entity = new PmfmQualValueImpl();
172             entity.setQualitativeValue(qualitativeValue);
173             entity.setPmfm(pmfm);
174             return entity;
175         }
176 
177         /**
178          * Constructs a new instance of {@link PmfmQualValue}, taking all possible properties
179          * (except the identifier(s))as arguments.
180          * @param updateDt Timestamp
181          * @param qualitativeValue QualitativeValue
182          * @param pmfm Pmfm
183          * @return newInstance PmfmQualValue
184          */
185         public static PmfmQualValue newInstance(Timestamp updateDt, QualitativeValue qualitativeValue, Pmfm pmfm)
186         {
187             final PmfmQualValue entity = new PmfmQualValueImpl();
188             entity.setUpdateDt(updateDt);
189             entity.setQualitativeValue(qualitativeValue);
190             entity.setPmfm(pmfm);
191             return entity;
192         }
193     }
194 
195     /**
196      * @see Comparable#compareTo
197      */
198     public int compareTo(PmfmQualValue o)
199     {
200         int cmp = 0;
201         if (this.getPmfmQualValuePk() != null)
202         {
203             cmp = this.getPmfmQualValuePk().compareTo(o.getPmfmQualValuePk());
204         }
205             if (this.getUpdateDt() != null)
206             {
207                 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
208             }
209         return cmp;
210     }
211 // HibernateEntity.vsl merge-point
212 // PmfmQualValue.java merge-point
213 }