001// license-header java merge-point
002//
003// Attention: Generated code! Do not modify by hand!
004// Generated by: hibernate/HibernateEntity.vsl in andromda-hibernate-cartridge.
005//
006package fr.ifremer.adagio.core.dao.administration.programStrategy;
007
008/*
009 * #%L
010 * SIH-Adagio :: Core
011 * $Id:$
012 * $HeadURL:$
013 * %%
014 * Copyright (C) 2012 - 2014 Ifremer
015 * %%
016 * This program is free software: you can redistribute it and/or modify
017 * it under the terms of the GNU Affero General Public License as published by
018 * the Free Software Foundation, either version 3 of the License, or
019 * (at your option) any later version.
020 * 
021 * This program is distributed in the hope that it will be useful,
022 * but WITHOUT ANY WARRANTY; without even the implied warranty of
023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
024 * GNU General Public License for more details.
025 * 
026 * You should have received a copy of the GNU Affero General Public License
027 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
028 * #L%
029 */
030
031import fr.ifremer.adagio.core.dao.referential.AnalysisInstrument;
032import fr.ifremer.adagio.core.dao.referential.gear.Gear;
033import fr.ifremer.adagio.core.dao.referential.metier.Metier;
034import fr.ifremer.adagio.core.dao.referential.pmfm.Pmfm;
035import fr.ifremer.adagio.core.dao.referential.taxon.ReferenceTaxon;
036import java.io.Serializable;
037
038/**
039 * 
040 */
041// HibernateEntity.vsl annotations merge-point
042public abstract class PmfmAppliedStrategy
043    implements Serializable, Comparable<PmfmAppliedStrategy>
044{
045    /**
046     * The serial version UID of this class. Needed for serialization.
047     */
048    private static final long serialVersionUID = 7277083404197558411L;
049
050    private PmfmAppliedStrategyPK pmfmAppliedStrategyPk;
051
052    /**
053     * Get the composite primary key identifier class
054     * @return pmfmAppliedStrategyPk
055     */
056    public PmfmAppliedStrategyPK getPmfmAppliedStrategyPk()
057    {
058        return this.pmfmAppliedStrategyPk;
059    }
060
061    /**
062     * Set the composite primary key identifier class
063     * @param pmfmAppliedStrategyPkIn
064     */
065    public void setPmfmAppliedStrategyPk(PmfmAppliedStrategyPK pmfmAppliedStrategyPkIn) {
066        this.pmfmAppliedStrategyPk = pmfmAppliedStrategyPkIn;
067    }
068
069    // Generate 0 attributes
070    // Generate 6 associations
071    private ReferenceTaxon referenceTaxon;
072
073    /**
074     * 
075     * @return this.referenceTaxon ReferenceTaxon
076     */
077    public ReferenceTaxon getReferenceTaxon()
078    {
079        return this.referenceTaxon;
080    }
081
082    /**
083     * 
084     * @param referenceTaxonIn ReferenceTaxon
085     */
086    public void setReferenceTaxon(ReferenceTaxon referenceTaxonIn)
087    {
088        this.referenceTaxon = referenceTaxonIn;
089    }
090
091    private Gear gear;
092
093    /**
094     * <html>
095     * <head>
096     * </head>
097     * <body>
098     * <p>
099     * D&#233;fini un engin, non pas engin physique, mais au sens &quot;classe d'engin&quot;.
100     * </p>
101     * <p>
102     * Il est possible de d&#233;finir un arboresence d'engin, au sein d'une meme
103     * classification, via les liens d'engin parents/enfants.
104     * </p>
105     * <p>
106     * <br>
107     * </p>
108     * <p>
109     * Exemple, pour la classification 'Engin EU corpus' :
110     * </p>
111     * <p>
112     * * 'corpus effort de p&#234;che'<br>- PAL Palangre de surface (Longliner)<br>
113     * </p>
114     * <p>
115     * - EP1 Engins petits p&#233;lagiques - corpus r&#233;glementaire 685/95
116     * </p>
117     * <p>
118     * * corpus 2 (...)<br>- ...
119     * </p>
120     * <p>
121     * <br>
122     * </p>
123     * <p>
124     * Exemple, pour la classification 'FAO/CISTEP' :<br>* 'chaluts' (code
125     * '03.0.0')<br>
126     * </p>
127     * <p>
128     * - 'OTB' 'chalut de fond'<br>
129     * </p>
130     * <p>
131     * - chalut p&#233;lagique
132     * </p>
133     * <p>
134     * - ...<br>* 'Filets'
135     * </p>
136     * </body>
137     * </html>
138     * @return this.gear Gear
139     */
140    public Gear getGear()
141    {
142        return this.gear;
143    }
144
145    /**
146     * <html>
147     * <head>
148     * </head>
149     * <body>
150     * <p>
151     * D&#233;fini un engin, non pas engin physique, mais au sens &quot;classe d'engin&quot;.
152     * </p>
153     * <p>
154     * Il est possible de d&#233;finir un arboresence d'engin, au sein d'une meme
155     * classification, via les liens d'engin parents/enfants.
156     * </p>
157     * <p>
158     * <br>
159     * </p>
160     * <p>
161     * Exemple, pour la classification 'Engin EU corpus' :
162     * </p>
163     * <p>
164     * * 'corpus effort de p&#234;che'<br>- PAL Palangre de surface (Longliner)<br>
165     * </p>
166     * <p>
167     * - EP1 Engins petits p&#233;lagiques - corpus r&#233;glementaire 685/95
168     * </p>
169     * <p>
170     * * corpus 2 (...)<br>- ...
171     * </p>
172     * <p>
173     * <br>
174     * </p>
175     * <p>
176     * Exemple, pour la classification 'FAO/CISTEP' :<br>* 'chaluts' (code
177     * '03.0.0')<br>
178     * </p>
179     * <p>
180     * - 'OTB' 'chalut de fond'<br>
181     * </p>
182     * <p>
183     * - chalut p&#233;lagique
184     * </p>
185     * <p>
186     * - ...<br>* 'Filets'
187     * </p>
188     * </body>
189     * </html>
190     * @param gearIn Gear
191     */
192    public void setGear(Gear gearIn)
193    {
194        this.gear = gearIn;
195    }
196
197    private Pmfm pmfm;
198
199    /**
200     * Quadruplet paramètre/support/méthode/fraction. Ce quadruplet est systématiquement associé aux
201     * résultats et décrit précisemment les conditions de mesure/d'analyse de ceux-ci.
202     * @return this.pmfm Pmfm
203     */
204    public Pmfm getPmfm()
205    {
206        return this.pmfm;
207    }
208
209    /**
210     * Quadruplet paramètre/support/méthode/fraction. Ce quadruplet est systématiquement associé aux
211     * résultats et décrit précisemment les conditions de mesure/d'analyse de ceux-ci.
212     * @param pmfmIn Pmfm
213     */
214    public void setPmfm(Pmfm pmfmIn)
215    {
216        this.pmfm = pmfmIn;
217    }
218
219    private AnalysisInstrument analysisInstrument;
220
221    /**
222     * Instrument servant à une analyse.
223     * Par exemple :
224     * - Ichtyomètre
225     * - Pied à coulisse
226     * @return this.analysisInstrument AnalysisInstrument
227     */
228    public AnalysisInstrument getAnalysisInstrument()
229    {
230        return this.analysisInstrument;
231    }
232
233    /**
234     * Instrument servant à une analyse.
235     * Par exemple :
236     * - Ichtyomètre
237     * - Pied à coulisse
238     * @param analysisInstrumentIn AnalysisInstrument
239     */
240    public void setAnalysisInstrument(AnalysisInstrument analysisInstrumentIn)
241    {
242        this.analysisInstrument = analysisInstrumentIn;
243    }
244
245    private AppliedStrategy appliedStrategy;
246
247    /**
248     * Une stratégie applicable est la stratégie qui s'applique pour un lieu de surveillance donné
249     * durant
250     * un interval de dates défini.
251     * @return this.appliedStrategy AppliedStrategy
252     */
253    public AppliedStrategy getAppliedStrategy()
254    {
255        return this.appliedStrategy;
256    }
257
258    /**
259     * Une stratégie applicable est la stratégie qui s'applique pour un lieu de surveillance donné
260     * durant
261     * un interval de dates défini.
262     * @param appliedStrategyIn AppliedStrategy
263     */
264    public void setAppliedStrategy(AppliedStrategy appliedStrategyIn)
265    {
266        this.appliedStrategy = appliedStrategyIn;
267    }
268
269    private Metier metier;
270
271    /**
272     * <html>
273     * <head>
274     * </head>
275     * <body>
276     * <p>
277     * M&#233;tier, qui peut etre un m&#233;tier de peche ou non.<br><br>Un
278     * m&#233;tier de peche a obligatoirement une esp&#232;ce cible (TaxonGroup) de
279     * d&#233;fini, et &#233;ventuellement un engin (Gear).
280     * </p>
281     * <p>
282     * Dans ce cas, le nom (name) et le mn&#233;monique (label) pourront etre
283     * d&#233;termin&#233; par la concat&#233;nation de l'engin et de l'esp&#232;ce cible.
284     * </p>
285     * <p>
286     * <br>
287     * <br>
288     * </p>
289     * <p>
290     * <u>V2.1 </u>: modification de la gestion des m&#233;tiers : suppression des
291     * classes FishingMetierGearType et MetierSpecies : un m&#233;tier est
292     * maintenant d&#233;fini directement par Gear et TaxonGroup.<br><br>=&gt; Le
293     * r&#233;f&#233;rentiel des engin du m&#233;tier (FishingMetierGearType) est maintenent
294     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des engins<br>
295     * </p>
296     * <p>
297     * </p>
298     * <p>
299     * =&gt; Le r&#233;f&#233;rentiel des esp&#232;ces m&#233;tier (MetierSpecies) est maintenent
300     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des groupes de taxon<br><br>
301     * </p>
302     * <p>
303     * <u>V3 </u>:<br>- Le m&#233;tier de peche n'a pas forc&#233;ment d'engin
304     * (optionnel) Ex : AQUNEP
305     * </p>
306     * <p>
307     * (Aquaculture)<br>- le mn&#233;monique et le libell&#233; ne sont plus calcul&#233;s &#224;
308     * la vol&#233;e par concat&#233;nation, pour permettre l'utilisation de libell&#233; plus
309     * court..
310     * </p>
311     * </body>
312     * </html>
313     * @return this.metier Metier
314     */
315    public Metier getMetier()
316    {
317        return this.metier;
318    }
319
320    /**
321     * <html>
322     * <head>
323     * </head>
324     * <body>
325     * <p>
326     * M&#233;tier, qui peut etre un m&#233;tier de peche ou non.<br><br>Un
327     * m&#233;tier de peche a obligatoirement une esp&#232;ce cible (TaxonGroup) de
328     * d&#233;fini, et &#233;ventuellement un engin (Gear).
329     * </p>
330     * <p>
331     * Dans ce cas, le nom (name) et le mn&#233;monique (label) pourront etre
332     * d&#233;termin&#233; par la concat&#233;nation de l'engin et de l'esp&#232;ce cible.
333     * </p>
334     * <p>
335     * <br>
336     * <br>
337     * </p>
338     * <p>
339     * <u>V2.1 </u>: modification de la gestion des m&#233;tiers : suppression des
340     * classes FishingMetierGearType et MetierSpecies : un m&#233;tier est
341     * maintenant d&#233;fini directement par Gear et TaxonGroup.<br><br>=&gt; Le
342     * r&#233;f&#233;rentiel des engin du m&#233;tier (FishingMetierGearType) est maintenent
343     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des engins<br>
344     * </p>
345     * <p>
346     * </p>
347     * <p>
348     * =&gt; Le r&#233;f&#233;rentiel des esp&#232;ces m&#233;tier (MetierSpecies) est maintenent
349     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des groupes de taxon<br><br>
350     * </p>
351     * <p>
352     * <u>V3 </u>:<br>- Le m&#233;tier de peche n'a pas forc&#233;ment d'engin
353     * (optionnel) Ex : AQUNEP
354     * </p>
355     * <p>
356     * (Aquaculture)<br>- le mn&#233;monique et le libell&#233; ne sont plus calcul&#233;s &#224;
357     * la vol&#233;e par concat&#233;nation, pour permettre l'utilisation de libell&#233; plus
358     * court..
359     * </p>
360     * </body>
361     * </html>
362     * @param metierIn Metier
363     */
364    public void setMetier(Metier metierIn)
365    {
366        this.metier = metierIn;
367    }
368
369    /**
370     * This entity does not have any identifiers
371     * and is not extending any other entity,
372     * so this method will only return <code>true</code> if the argument reference and <code>this</code>
373     * refer to the same object.
374     */
375    @Override
376    public boolean equals(Object object)
377    {
378        return super.equals(object);
379    }
380
381    /**
382     * This entity does not have any identifiers
383     * and is not extending any other entity,
384     * so this method will only take the identifiers of this entity into account when calculating the hash code.
385     */
386    @Override
387    public int hashCode()
388    {
389        return super.hashCode();
390    }
391
392    /**
393     * Constructs new instances of {@link PmfmAppliedStrategy}.
394     */
395    public static final class Factory
396    {
397        /**
398         * Constructs a new instance of {@link PmfmAppliedStrategy}.
399         * @return new PmfmAppliedStrategyImpl()
400         */
401        public static PmfmAppliedStrategy newInstance()
402        {
403            return new PmfmAppliedStrategyImpl();
404        }
405
406        /**
407         * Constructs a new instance of {@link PmfmAppliedStrategy}, taking all required and/or
408         * read-only properties as arguments, except for identifiers.
409         * @param pmfm Pmfm
410         * @param appliedStrategy AppliedStrategy
411         * @return newInstance
412         */
413        public static PmfmAppliedStrategy newInstance(Pmfm pmfm, AppliedStrategy appliedStrategy)
414        {
415            final PmfmAppliedStrategy entity = new PmfmAppliedStrategyImpl();
416            entity.setPmfm(pmfm);
417            entity.setAppliedStrategy(appliedStrategy);
418            return entity;
419        }
420
421        /**
422         * Constructs a new instance of {@link PmfmAppliedStrategy}, taking all possible properties
423         * (except the identifier(s))as arguments.
424         * @param referenceTaxon ReferenceTaxon
425         * @param gear Gear
426         * @param pmfm Pmfm
427         * @param analysisInstrument AnalysisInstrument
428         * @param appliedStrategy AppliedStrategy
429         * @param metier Metier
430         * @return newInstance PmfmAppliedStrategy
431         */
432        public static PmfmAppliedStrategy newInstance(ReferenceTaxon referenceTaxon, Gear gear, Pmfm pmfm, AnalysisInstrument analysisInstrument, AppliedStrategy appliedStrategy, Metier metier)
433        {
434            final PmfmAppliedStrategy entity = new PmfmAppliedStrategyImpl();
435            entity.setReferenceTaxon(referenceTaxon);
436            entity.setGear(gear);
437            entity.setPmfm(pmfm);
438            entity.setAnalysisInstrument(analysisInstrument);
439            entity.setAppliedStrategy(appliedStrategy);
440            entity.setMetier(metier);
441            return entity;
442        }
443    }
444
445    /**
446     * @see Comparable#compareTo
447     */
448    public int compareTo(PmfmAppliedStrategy o)
449    {
450        int cmp = 0;
451        if (this.getPmfmAppliedStrategyPk() != null)
452        {
453            cmp = this.getPmfmAppliedStrategyPk().compareTo(o.getPmfmAppliedStrategyPk());
454        }
455        return cmp;
456    }
457// HibernateEntity.vsl merge-point
458// PmfmAppliedStrategy.java merge-point
459}