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.administration.strategy;
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.administration.user.Department;
29  import fr.ifremer.quadrige3.core.dao.referential.AnalysisInstrument;
30  import java.io.Serializable;
31  import java.sql.Timestamp;
32  
33  /**
34   * PMSF associés à une stratégie pour un lieu données.
35   */
36  // HibernateEntity.vsl annotations merge-point
37  public abstract class PmfmAppliedStrategy
38      implements Serializable, Comparable<PmfmAppliedStrategy>
39  {
40      /**
41       * The serial version UID of this class. Needed for serialization.
42       */
43      private static final long serialVersionUID = -1991543001677708973L;
44  
45      private PmfmAppliedStrategyPK pmfmAppliedStrategyPk;
46  
47      /**
48       * Get the composite primary key identifier class
49       * @return pmfmAppliedStrategyPk
50       */
51      public PmfmAppliedStrategyPK getPmfmAppliedStrategyPk()
52      {
53          return this.pmfmAppliedStrategyPk;
54      }
55  
56      /**
57       * Set the composite primary key identifier class
58       * @param pmfmAppliedStrategyPkIn
59       */
60      public void setPmfmAppliedStrategyPk(PmfmAppliedStrategyPK pmfmAppliedStrategyPkIn) {
61          this.pmfmAppliedStrategyPk = pmfmAppliedStrategyPkIn;
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 4 associations
86      private Department department;
87  
88      /**
89       * Liste les départements ou services auxquels sont rattachés les agents
90       * @return this.department Department
91       */
92      public Department getDepartment()
93      {
94          return this.department;
95      }
96  
97      /**
98       * Liste les départements ou services auxquels sont rattachés les agents
99       * @param departmentIn Department
100      */
101     public void setDepartment(Department departmentIn)
102     {
103         this.department = departmentIn;
104     }
105 
106     private AnalysisInstrument analysisInstrument;
107 
108     /**
109      * Liste les engins d'analyse ou de prélèvement (au sens marque/modèle et non numéro de série).
110      * @return this.analysisInstrument AnalysisInstrument
111      */
112     public AnalysisInstrument getAnalysisInstrument()
113     {
114         return this.analysisInstrument;
115     }
116 
117     /**
118      * Liste les engins d'analyse ou de prélèvement (au sens marque/modèle et non numéro de série).
119      * @param analysisInstrumentIn AnalysisInstrument
120      */
121     public void setAnalysisInstrument(AnalysisInstrument analysisInstrumentIn)
122     {
123         this.analysisInstrument = analysisInstrumentIn;
124     }
125 
126     private PmfmStrategy pmfmStrategy;
127 
128     /**
129      * PSFM associés à une stratégie
130      * PMSF associés à une stratégie.
131      * @return this.pmfmStrategy PmfmStrategy
132      */
133     public PmfmStrategy getPmfmStrategy()
134     {
135         return this.pmfmStrategy;
136     }
137 
138     /**
139      * PSFM associés à une stratégie
140      * PMSF associés à une stratégie.
141      * @param pmfmStrategyIn PmfmStrategy
142      */
143     public void setPmfmStrategy(PmfmStrategy pmfmStrategyIn)
144     {
145         this.pmfmStrategy = pmfmStrategyIn;
146     }
147 
148     private AppliedStrategy appliedStrategy;
149 
150     /**
151      * Identifie les conditions d'application locale de la stratégie pour une période donnée.
152      * @return this.appliedStrategy AppliedStrategy
153      */
154     public AppliedStrategy getAppliedStrategy()
155     {
156         return this.appliedStrategy;
157     }
158 
159     /**
160      * Identifie les conditions d'application locale de la stratégie pour une période donnée.
161      * @param appliedStrategyIn AppliedStrategy
162      */
163     public void setAppliedStrategy(AppliedStrategy appliedStrategyIn)
164     {
165         this.appliedStrategy = appliedStrategyIn;
166     }
167 
168     /**
169      * This entity does not have any identifiers
170      * and is not extending any other entity,
171      * so this method will only return <code>true</code> if the argument reference and <code>this</code>
172      * refer to the same object.
173      */
174     @Override
175     public boolean equals(Object object)
176     {
177         return super.equals(object);
178     }
179 
180     /**
181      * This entity does not have any identifiers
182      * and is not extending any other entity,
183      * so this method will only take the identifiers of this entity into account when calculating the hash code.
184      */
185     @Override
186     public int hashCode()
187     {
188         return super.hashCode();
189     }
190 
191     /**
192      * Constructs new instances of {@link PmfmAppliedStrategy}.
193      */
194     public static final class Factory
195     {
196         /**
197          * Constructs a new instance of {@link PmfmAppliedStrategy}.
198          * @return new PmfmAppliedStrategyImpl()
199          */
200         public static PmfmAppliedStrategy newInstance()
201         {
202             return new PmfmAppliedStrategyImpl();
203         }
204 
205         /**
206          * Constructs a new instance of {@link PmfmAppliedStrategy}, taking all required and/or
207          * read-only properties as arguments, except for identifiers.
208          * @param pmfmStrategy PmfmStrategy
209          * @param appliedStrategy AppliedStrategy
210          * @return newInstance
211          */
212         public static PmfmAppliedStrategy newInstance(PmfmStrategy pmfmStrategy, AppliedStrategy appliedStrategy)
213         {
214             final PmfmAppliedStrategy entity = new PmfmAppliedStrategyImpl();
215             entity.setPmfmStrategy(pmfmStrategy);
216             entity.setAppliedStrategy(appliedStrategy);
217             return entity;
218         }
219 
220         /**
221          * Constructs a new instance of {@link PmfmAppliedStrategy}, taking all possible properties
222          * (except the identifier(s))as arguments.
223          * @param updateDt Timestamp
224          * @param department Department
225          * @param analysisInstrument AnalysisInstrument
226          * @param pmfmStrategy PmfmStrategy
227          * @param appliedStrategy AppliedStrategy
228          * @return newInstance PmfmAppliedStrategy
229          */
230         public static PmfmAppliedStrategy newInstance(Timestamp updateDt, Department department, AnalysisInstrument analysisInstrument, PmfmStrategy pmfmStrategy, AppliedStrategy appliedStrategy)
231         {
232             final PmfmAppliedStrategy entity = new PmfmAppliedStrategyImpl();
233             entity.setUpdateDt(updateDt);
234             entity.setDepartment(department);
235             entity.setAnalysisInstrument(analysisInstrument);
236             entity.setPmfmStrategy(pmfmStrategy);
237             entity.setAppliedStrategy(appliedStrategy);
238             return entity;
239         }
240     }
241 
242     /**
243      * @see Comparable#compareTo
244      */
245     public int compareTo(PmfmAppliedStrategy o)
246     {
247         int cmp = 0;
248         if (this.getPmfmAppliedStrategyPk() != null)
249         {
250             cmp = this.getPmfmAppliedStrategyPk().compareTo(o.getPmfmAppliedStrategyPk());
251         }
252             if (this.getUpdateDt() != null)
253             {
254                 cmp = (cmp != 0 ? cmp : this.getUpdateDt().compareTo(o.getUpdateDt()));
255             }
256         return cmp;
257     }
258 // HibernateEntity.vsl merge-point
259 // PmfmAppliedStrategy.java merge-point
260 }