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.PrecisionType;
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 PmfmStrategy
043    implements Serializable, Comparable<PmfmStrategy>
044{
045    /**
046     * The serial version UID of this class. Needed for serialization.
047     */
048    private static final long serialVersionUID = 301800090645795415L;
049
050    // Generate 6 attributes
051    private Integer id;
052
053    /**
054     * Identifiant interne. généré par le système.
055     * @return this.id Integer
056     */
057    public Integer getId()
058    {
059        return this.id;
060    }
061
062    /**
063     * Identifiant interne. généré par le système.
064     * @param idIn Integer
065     */
066    public void setId(Integer idIn)
067    {
068        this.id = idIn;
069    }
070
071    private Integer acquisitionNumber = Integer.valueOf("1");
072
073    /**
074     * 
075     * @return this.acquisitionNumber Integer
076     */
077    public Integer getAcquisitionNumber()
078    {
079        return this.acquisitionNumber;
080    }
081
082    /**
083     * 
084     * @param acquisitionNumberIn Integer
085     */
086    public void setAcquisitionNumber(Integer acquisitionNumberIn)
087    {
088        this.acquisitionNumber = acquisitionNumberIn;
089    }
090
091    private Integer rankOrder;
092
093    /**
094     * 
095     * @return this.rankOrder Integer
096     */
097    public Integer getRankOrder()
098    {
099        return this.rankOrder;
100    }
101
102    /**
103     * 
104     * @param rankOrderIn Integer
105     */
106    public void setRankOrder(Integer rankOrderIn)
107    {
108        this.rankOrder = rankOrderIn;
109    }
110
111    private Boolean isMandatory;
112
113    /**
114     * 
115     * @return this.isMandatory Boolean
116     */
117    public Boolean isIsMandatory()
118    {
119        return this.isMandatory;
120    }
121
122    /**
123     * 
124     * @param isMandatoryIn Boolean
125     */
126    public void setIsMandatory(Boolean isMandatoryIn)
127    {
128        this.isMandatory = isMandatoryIn;
129    }
130
131    private Float minValue;
132
133    /**
134     * 
135     * @return this.minValue Float
136     */
137    public Float getMinValue()
138    {
139        return this.minValue;
140    }
141
142    /**
143     * 
144     * @param minValueIn Float
145     */
146    public void setMinValue(Float minValueIn)
147    {
148        this.minValue = minValueIn;
149    }
150
151    private Float maxValue;
152
153    /**
154     * 
155     * @return this.maxValue Float
156     */
157    public Float getMaxValue()
158    {
159        return this.maxValue;
160    }
161
162    /**
163     * 
164     * @param maxValueIn Float
165     */
166    public void setMaxValue(Float maxValueIn)
167    {
168        this.maxValue = maxValueIn;
169    }
170
171    // Generate 7 associations
172    private ReferenceTaxon referenceTaxon;
173
174    /**
175     * 
176     * @return this.referenceTaxon ReferenceTaxon
177     */
178    public ReferenceTaxon getReferenceTaxon()
179    {
180        return this.referenceTaxon;
181    }
182
183    /**
184     * 
185     * @param referenceTaxonIn ReferenceTaxon
186     */
187    public void setReferenceTaxon(ReferenceTaxon referenceTaxonIn)
188    {
189        this.referenceTaxon = referenceTaxonIn;
190    }
191
192    private Gear gear;
193
194    /**
195     * <html>
196     * <head>
197     * </head>
198     * <body>
199     * <p>
200     * D&#233;fini un engin, non pas engin physique, mais au sens &quot;classe d'engin&quot;.
201     * </p>
202     * <p>
203     * Il est possible de d&#233;finir un arboresence d'engin, au sein d'une meme
204     * classification, via les liens d'engin parents/enfants.
205     * </p>
206     * <p>
207     * <br>
208     * </p>
209     * <p>
210     * Exemple, pour la classification 'Engin EU corpus' :
211     * </p>
212     * <p>
213     * * 'corpus effort de p&#234;che'<br>- PAL Palangre de surface (Longliner)<br>
214     * </p>
215     * <p>
216     * - EP1 Engins petits p&#233;lagiques - corpus r&#233;glementaire 685/95
217     * </p>
218     * <p>
219     * * corpus 2 (...)<br>- ...
220     * </p>
221     * <p>
222     * <br>
223     * </p>
224     * <p>
225     * Exemple, pour la classification 'FAO/CISTEP' :<br>* 'chaluts' (code
226     * '03.0.0')<br>
227     * </p>
228     * <p>
229     * - 'OTB' 'chalut de fond'<br>
230     * </p>
231     * <p>
232     * - chalut p&#233;lagique
233     * </p>
234     * <p>
235     * - ...<br>* 'Filets'
236     * </p>
237     * </body>
238     * </html>
239     * @return this.gear Gear
240     */
241    public Gear getGear()
242    {
243        return this.gear;
244    }
245
246    /**
247     * <html>
248     * <head>
249     * </head>
250     * <body>
251     * <p>
252     * D&#233;fini un engin, non pas engin physique, mais au sens &quot;classe d'engin&quot;.
253     * </p>
254     * <p>
255     * Il est possible de d&#233;finir un arboresence d'engin, au sein d'une meme
256     * classification, via les liens d'engin parents/enfants.
257     * </p>
258     * <p>
259     * <br>
260     * </p>
261     * <p>
262     * Exemple, pour la classification 'Engin EU corpus' :
263     * </p>
264     * <p>
265     * * 'corpus effort de p&#234;che'<br>- PAL Palangre de surface (Longliner)<br>
266     * </p>
267     * <p>
268     * - EP1 Engins petits p&#233;lagiques - corpus r&#233;glementaire 685/95
269     * </p>
270     * <p>
271     * * corpus 2 (...)<br>- ...
272     * </p>
273     * <p>
274     * <br>
275     * </p>
276     * <p>
277     * Exemple, pour la classification 'FAO/CISTEP' :<br>* 'chaluts' (code
278     * '03.0.0')<br>
279     * </p>
280     * <p>
281     * - 'OTB' 'chalut de fond'<br>
282     * </p>
283     * <p>
284     * - chalut p&#233;lagique
285     * </p>
286     * <p>
287     * - ...<br>* 'Filets'
288     * </p>
289     * </body>
290     * </html>
291     * @param gearIn Gear
292     */
293    public void setGear(Gear gearIn)
294    {
295        this.gear = gearIn;
296    }
297
298    private PrecisionType precisionType;
299
300    /**
301     * Type d'incertitude, par exemple intervalle de confiance ou % d'incertitude
302     * @return this.precisionType PrecisionType
303     */
304    public PrecisionType getPrecisionType()
305    {
306        return this.precisionType;
307    }
308
309    /**
310     * Type d'incertitude, par exemple intervalle de confiance ou % d'incertitude
311     * @param precisionTypeIn PrecisionType
312     */
313    public void setPrecisionType(PrecisionType precisionTypeIn)
314    {
315        this.precisionType = precisionTypeIn;
316    }
317
318    private Strategy strategy;
319
320    /**
321     * La stratégie définit a priori ce que devront être les données présentes dans le système de
322     * l'origine
323     * de la collecte des données. Il s'agit de la liste des paramètres à mesurer, ainsi que des
324     * méthodes
325     * préconisées pour chacun de ces paramètres. La stratégie permet ainsi d'aider à la saisie des
326     * données, en personnalisant les écrans, et facilite la consultation rapide du contenu
327     * théorique de la
328     * base.
329     * Par exemple, on pourra avoir les stratégies suivantes :
330     * - stratégie "échantillonnage pendant les marées observées"
331     * - stratégie "échantillonnage pendant les campagne à la mer"
332     * @return this.strategy Strategy
333     */
334    public Strategy getStrategy()
335    {
336        return this.strategy;
337    }
338
339    /**
340     * La stratégie définit a priori ce que devront être les données présentes dans le système de
341     * l'origine
342     * de la collecte des données. Il s'agit de la liste des paramètres à mesurer, ainsi que des
343     * méthodes
344     * préconisées pour chacun de ces paramètres. La stratégie permet ainsi d'aider à la saisie des
345     * données, en personnalisant les écrans, et facilite la consultation rapide du contenu
346     * théorique de la
347     * base.
348     * Par exemple, on pourra avoir les stratégies suivantes :
349     * - stratégie "échantillonnage pendant les marées observées"
350     * - stratégie "échantillonnage pendant les campagne à la mer"
351     * @param strategyIn Strategy
352     */
353    public void setStrategy(Strategy strategyIn)
354    {
355        this.strategy = strategyIn;
356    }
357
358    private AcquisitionLevel acquisitionLevel;
359
360    /**
361     * Niveau de saisie sur lequel un quadruplet PSFM peut avoir des résultats. Ce niveau de saisie
362     * est
363     * défini via les stratégies.
364     * Exemple :
365     * • Opération
366     * • Opération de prélèvement
367     * • Lot (Quantification de lot ou Classement de lot)
368     * • Echantillon
369     * Typiquement, le PSFM "mesure par Ichtyomètre de la taille d'un poisson entier" pourra être
370     * saisit
371     * sur un lot (comme critère de classement) et sur les résultats de mesure sur un échantillon
372     * (effectuée en laboratoire). Ce PSFM pourra donc avoir les deux niveaus de saisie suivants :
373     * "Lot" et
374     * "Echantillon"
375     * @return this.acquisitionLevel AcquisitionLevel
376     */
377    public AcquisitionLevel getAcquisitionLevel()
378    {
379        return this.acquisitionLevel;
380    }
381
382    /**
383     * Niveau de saisie sur lequel un quadruplet PSFM peut avoir des résultats. Ce niveau de saisie
384     * est
385     * défini via les stratégies.
386     * Exemple :
387     * • Opération
388     * • Opération de prélèvement
389     * • Lot (Quantification de lot ou Classement de lot)
390     * • Echantillon
391     * Typiquement, le PSFM "mesure par Ichtyomètre de la taille d'un poisson entier" pourra être
392     * saisit
393     * sur un lot (comme critère de classement) et sur les résultats de mesure sur un échantillon
394     * (effectuée en laboratoire). Ce PSFM pourra donc avoir les deux niveaus de saisie suivants :
395     * "Lot" et
396     * "Echantillon"
397     * @param acquisitionLevelIn AcquisitionLevel
398     */
399    public void setAcquisitionLevel(AcquisitionLevel acquisitionLevelIn)
400    {
401        this.acquisitionLevel = acquisitionLevelIn;
402    }
403
404    private Metier metier;
405
406    /**
407     * <html>
408     * <head>
409     * </head>
410     * <body>
411     * <p>
412     * M&#233;tier, qui peut etre un m&#233;tier de peche ou non.<br><br>Un
413     * m&#233;tier de peche a obligatoirement une esp&#232;ce cible (TaxonGroup) de
414     * d&#233;fini, et &#233;ventuellement un engin (Gear).
415     * </p>
416     * <p>
417     * Dans ce cas, le nom (name) et le mn&#233;monique (label) pourront etre
418     * d&#233;termin&#233; par la concat&#233;nation de l'engin et de l'esp&#232;ce cible.
419     * </p>
420     * <p>
421     * <br>
422     * <br>
423     * </p>
424     * <p>
425     * <u>V2.1 </u>: modification de la gestion des m&#233;tiers : suppression des
426     * classes FishingMetierGearType et MetierSpecies : un m&#233;tier est
427     * maintenant d&#233;fini directement par Gear et TaxonGroup.<br><br>=&gt; Le
428     * r&#233;f&#233;rentiel des engin du m&#233;tier (FishingMetierGearType) est maintenent
429     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des engins<br>
430     * </p>
431     * <p>
432     * </p>
433     * <p>
434     * =&gt; Le r&#233;f&#233;rentiel des esp&#232;ces m&#233;tier (MetierSpecies) est maintenent
435     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des groupes de taxon<br><br>
436     * </p>
437     * <p>
438     * <u>V3 </u>:<br>- Le m&#233;tier de peche n'a pas forc&#233;ment d'engin
439     * (optionnel) Ex : AQUNEP
440     * </p>
441     * <p>
442     * (Aquaculture)<br>- le mn&#233;monique et le libell&#233; ne sont plus calcul&#233;s &#224;
443     * la vol&#233;e par concat&#233;nation, pour permettre l'utilisation de libell&#233; plus
444     * court..
445     * </p>
446     * </body>
447     * </html>
448     * @return this.metier Metier
449     */
450    public Metier getMetier()
451    {
452        return this.metier;
453    }
454
455    /**
456     * <html>
457     * <head>
458     * </head>
459     * <body>
460     * <p>
461     * M&#233;tier, qui peut etre un m&#233;tier de peche ou non.<br><br>Un
462     * m&#233;tier de peche a obligatoirement une esp&#232;ce cible (TaxonGroup) de
463     * d&#233;fini, et &#233;ventuellement un engin (Gear).
464     * </p>
465     * <p>
466     * Dans ce cas, le nom (name) et le mn&#233;monique (label) pourront etre
467     * d&#233;termin&#233; par la concat&#233;nation de l'engin et de l'esp&#232;ce cible.
468     * </p>
469     * <p>
470     * <br>
471     * <br>
472     * </p>
473     * <p>
474     * <u>V2.1 </u>: modification de la gestion des m&#233;tiers : suppression des
475     * classes FishingMetierGearType et MetierSpecies : un m&#233;tier est
476     * maintenant d&#233;fini directement par Gear et TaxonGroup.<br><br>=&gt; Le
477     * r&#233;f&#233;rentiel des engin du m&#233;tier (FishingMetierGearType) est maintenent
478     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des engins<br>
479     * </p>
480     * <p>
481     * </p>
482     * <p>
483     * =&gt; Le r&#233;f&#233;rentiel des esp&#232;ces m&#233;tier (MetierSpecies) est maintenent
484     * int&#233;gr&#233; au r&#233;f&#233;rentiel g&#233;n&#233;rique des groupes de taxon<br><br>
485     * </p>
486     * <p>
487     * <u>V3 </u>:<br>- Le m&#233;tier de peche n'a pas forc&#233;ment d'engin
488     * (optionnel) Ex : AQUNEP
489     * </p>
490     * <p>
491     * (Aquaculture)<br>- le mn&#233;monique et le libell&#233; ne sont plus calcul&#233;s &#224;
492     * la vol&#233;e par concat&#233;nation, pour permettre l'utilisation de libell&#233; plus
493     * court..
494     * </p>
495     * </body>
496     * </html>
497     * @param metierIn Metier
498     */
499    public void setMetier(Metier metierIn)
500    {
501        this.metier = metierIn;
502    }
503
504    private Pmfm pmfm;
505
506    /**
507     * Quadruplet paramètre/support/méthode/fraction. Ce quadruplet est systématiquement associé aux
508     * résultats et décrit précisemment les conditions de mesure/d'analyse de ceux-ci.
509     * @return this.pmfm Pmfm
510     */
511    public Pmfm getPmfm()
512    {
513        return this.pmfm;
514    }
515
516    /**
517     * Quadruplet paramètre/support/méthode/fraction. Ce quadruplet est systématiquement associé aux
518     * résultats et décrit précisemment les conditions de mesure/d'analyse de ceux-ci.
519     * @param pmfmIn Pmfm
520     */
521    public void setPmfm(Pmfm pmfmIn)
522    {
523        this.pmfm = pmfmIn;
524    }
525
526    /**
527     * Returns <code>true</code> if the argument is an PmfmStrategy instance and all identifiers for this entity
528     * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
529     */
530    @Override
531    public boolean equals(Object object)
532    {
533        if (this == object)
534        {
535            return true;
536        }
537        if (!(object instanceof PmfmStrategy))
538        {
539            return false;
540        }
541        final PmfmStrategy that = (PmfmStrategy)object;
542        if (this.id == null || that.getId() == null || !this.id.equals(that.getId()))
543        {
544            return false;
545        }
546        return true;
547    }
548
549    /**
550     * Returns a hash code based on this entity's identifiers.
551     */
552    @Override
553    public int hashCode()
554    {
555        int hashCode = 0;
556        hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode());
557
558        return hashCode;
559    }
560
561    /**
562     * Constructs new instances of {@link PmfmStrategy}.
563     */
564    public static final class Factory
565    {
566        /**
567         * Constructs a new instance of {@link PmfmStrategy}.
568         * @return new PmfmStrategyImpl()
569         */
570        public static PmfmStrategy newInstance()
571        {
572            return new PmfmStrategyImpl();
573        }
574
575        /**
576         * Constructs a new instance of {@link PmfmStrategy}, taking all required and/or
577         * read-only properties as arguments, except for identifiers.
578         * @param acquisitionNumber Integer
579         * @param rankOrder Integer
580         * @param isMandatory Boolean
581         * @param strategy Strategy
582         * @param acquisitionLevel AcquisitionLevel
583         * @param pmfm Pmfm
584         * @return newInstance
585         */
586        public static PmfmStrategy newInstance(Integer acquisitionNumber, Integer rankOrder, Boolean isMandatory, Strategy strategy, AcquisitionLevel acquisitionLevel, Pmfm pmfm)
587        {
588            final PmfmStrategy entity = new PmfmStrategyImpl();
589            entity.setAcquisitionNumber(acquisitionNumber);
590            entity.setRankOrder(rankOrder);
591            entity.setIsMandatory(isMandatory);
592            entity.setStrategy(strategy);
593            entity.setAcquisitionLevel(acquisitionLevel);
594            entity.setPmfm(pmfm);
595            return entity;
596        }
597
598        /**
599         * Constructs a new instance of {@link PmfmStrategy}, taking all possible properties
600         * (except the identifier(s))as arguments.
601         * @param acquisitionNumber Integer
602         * @param rankOrder Integer
603         * @param isMandatory Boolean
604         * @param minValue Float
605         * @param maxValue Float
606         * @param referenceTaxon ReferenceTaxon
607         * @param gear Gear
608         * @param precisionType PrecisionType
609         * @param strategy Strategy
610         * @param acquisitionLevel AcquisitionLevel
611         * @param metier Metier
612         * @param pmfm Pmfm
613         * @return newInstance PmfmStrategy
614         */
615        public static PmfmStrategy newInstance(Integer acquisitionNumber, Integer rankOrder, Boolean isMandatory, Float minValue, Float maxValue, ReferenceTaxon referenceTaxon, Gear gear, PrecisionType precisionType, Strategy strategy, AcquisitionLevel acquisitionLevel, Metier metier, Pmfm pmfm)
616        {
617            final PmfmStrategy entity = new PmfmStrategyImpl();
618            entity.setAcquisitionNumber(acquisitionNumber);
619            entity.setRankOrder(rankOrder);
620            entity.setIsMandatory(isMandatory);
621            entity.setMinValue(minValue);
622            entity.setMaxValue(maxValue);
623            entity.setReferenceTaxon(referenceTaxon);
624            entity.setGear(gear);
625            entity.setPrecisionType(precisionType);
626            entity.setStrategy(strategy);
627            entity.setAcquisitionLevel(acquisitionLevel);
628            entity.setMetier(metier);
629            entity.setPmfm(pmfm);
630            return entity;
631        }
632    }
633
634    /**
635     * @see Comparable#compareTo
636     */
637    public int compareTo(PmfmStrategy o)
638    {
639        int cmp = 0;
640        if (this.getId() != null)
641        {
642            cmp = this.getId().compareTo(o.getId());
643        }
644        else
645        {
646            if (this.getAcquisitionNumber() != null)
647            {
648                cmp = (cmp != 0 ? cmp : this.getAcquisitionNumber().compareTo(o.getAcquisitionNumber()));
649            }
650            if (this.getRankOrder() != null)
651            {
652                cmp = (cmp != 0 ? cmp : this.getRankOrder().compareTo(o.getRankOrder()));
653            }
654            if (this.isIsMandatory() != null)
655            {
656                cmp = (cmp != 0 ? cmp : this.isIsMandatory().compareTo(o.isIsMandatory()));
657            }
658            if (this.getMinValue() != null)
659            {
660                cmp = (cmp != 0 ? cmp : this.getMinValue().compareTo(o.getMinValue()));
661            }
662            if (this.getMaxValue() != null)
663            {
664                cmp = (cmp != 0 ? cmp : this.getMaxValue().compareTo(o.getMaxValue()));
665            }
666        }
667        return cmp;
668    }
669// HibernateEntity.vsl merge-point
670// PmfmStrategy.java merge-point
671}