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.data.produce;
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.data.batch.Batch;
032import fr.ifremer.adagio.core.dao.data.fishingArea.FishingArea;
033import fr.ifremer.adagio.core.dao.data.measure.ProduceQuantificationMeasurement;
034import fr.ifremer.adagio.core.dao.data.measure.ProduceSortingMeasurement;
035import fr.ifremer.adagio.core.dao.data.operation.FishingOperation;
036import fr.ifremer.adagio.core.dao.data.sale.ExpectedSale;
037import fr.ifremer.adagio.core.dao.data.survey.landing.Landing;
038import fr.ifremer.adagio.core.dao.data.survey.sale.Sale;
039import fr.ifremer.adagio.core.dao.data.survey.takeOver.TakeOver;
040import fr.ifremer.adagio.core.dao.data.transshipment.Transshipment;
041import fr.ifremer.adagio.core.dao.referential.QualityFlag;
042import fr.ifremer.adagio.core.dao.referential.SaleType;
043import fr.ifremer.adagio.core.dao.referential.buyer.Buyer;
044import fr.ifremer.adagio.core.dao.referential.gear.Gear;
045import fr.ifremer.adagio.core.dao.referential.pmfm.Method;
046import fr.ifremer.adagio.core.dao.referential.pmfm.QualitativeValue;
047import fr.ifremer.adagio.core.dao.referential.taxon.TaxonGroup;
048import java.io.Serializable;
049import java.util.Collection;
050import java.util.Date;
051import java.util.HashSet;
052
053/**
054 * <html>
055 * <head>
056 * </head>
057 * <body>
058 * <p>
059 * Un produit est identifi&#233; par une esp&#232;ce commerciale, un &#233;tat, une
060 * qualit&#233;, pr&#233;sentation et cat&#233;gorie commerciale.
061 * </p>
062 * <p>
063 * </p>
064 * <p>
065 * <u>Si le produit est un &quot;produit vendu&quot; :</u>
066 * </p>
067 * <p>
068 * On pourra allors utiliser SortingMeasurement pour stocker des donn&#233;es
069 * &#233;conomiques, comme par exemple :
070 * </p>
071 * <p>
072 * - Le prix du produit. Il peut y avoir plusieurds prix (plusieurs PSFMs),
073 * par exemple : prix au kilo, et prix total en euros.
074 * </p>
075 * <p>
076 * - Valorisation de la commercialisation : Label rouge, Eco Label, marque
077 * collective control&#233;e par un organisme tier. (cf SACROIS)
078 * </p>
079 * <p>
080 * - Destination commerciale : consommation humaine, consommation animale,
081 * etc .
082 * </p>
083 * </body>
084 * </html>
085 */
086// HibernateEntity.vsl annotations merge-point
087public abstract class Produce
088    implements Serializable, Comparable<Produce>
089{
090    /**
091     * The serial version UID of this class. Needed for serialization.
092     */
093    private static final long serialVersionUID = -8733149705698574048L;
094
095    // Generate 11 attributes
096    private Integer id;
097
098    /**
099     * Identifiant interne du produit. Généré par le système.
100     * @return this.id Integer
101     */
102    public Integer getId()
103    {
104        return this.id;
105    }
106
107    /**
108     * Identifiant interne du produit. Généré par le système.
109     * @param idIn Integer
110     */
111    public void setId(Integer idIn)
112    {
113        this.id = idIn;
114    }
115
116    private Boolean isDiscard = Boolean.valueOf(false);
117
118    /**
119     * Le produit est-il un rejet ou non ?
120     * @return this.isDiscard Boolean
121     */
122    public Boolean isIsDiscard()
123    {
124        return this.isDiscard;
125    }
126
127    /**
128     * Le produit est-il un rejet ou non ?
129     * @param isDiscardIn Boolean
130     */
131    public void setIsDiscard(Boolean isDiscardIn)
132    {
133        this.isDiscard = isDiscardIn;
134    }
135
136    private Float subgroupCount;
137
138    /**
139     * Nombre de sous ensembles ayant servit à la quantification.
140     * Par exemple il pourra s'agir d'un nombre de caisse servant à quantifié le produit.
141     * Par exemple, pour une détermination de la quantification par les volumes :
142     * - nombre_sous_ensembles_quantifiés = 3
143     * - poids moyen par sous-ensemble = 5 kg
144     * => Poids total du lot = 3 x 5 = 15kg
145     * @return this.subgroupCount Float
146     */
147    public Float getSubgroupCount()
148    {
149        return this.subgroupCount;
150    }
151
152    /**
153     * Nombre de sous ensembles ayant servit à la quantification.
154     * Par exemple il pourra s'agir d'un nombre de caisse servant à quantifié le produit.
155     * Par exemple, pour une détermination de la quantification par les volumes :
156     * - nombre_sous_ensembles_quantifiés = 3
157     * - poids moyen par sous-ensemble = 5 kg
158     * => Poids total du lot = 3 x 5 = 15kg
159     * @param subgroupCountIn Float
160     */
161    public void setSubgroupCount(Float subgroupCountIn)
162    {
163        this.subgroupCount = subgroupCountIn;
164    }
165
166    private Short individualCount;
167
168    /**
169     * Nombre d'individus (optionnel). Utile pour les très gros individu.
170     * Ex : 1 espadon de 150kg
171     * @return this.individualCount Short
172     */
173    public Short getIndividualCount()
174    {
175        return this.individualCount;
176    }
177
178    /**
179     * Nombre d'individus (optionnel). Utile pour les très gros individu.
180     * Ex : 1 espadon de 150kg
181     * @param individualCountIn Short
182     */
183    public void setIndividualCount(Short individualCountIn)
184    {
185        this.individualCount = individualCountIn;
186    }
187
188    private String taxonGroupOtherInformation;
189
190    /**
191     * Autre information sur l'espèce du produit.
192     * Utilisé dans SACROIS/RIC2, pour stocker des informations complémentaires issues du
193     * référentiel espèce du Réseau Inter Criée (RIC).
194     * @return this.taxonGroupOtherInformation String
195     */
196    public String getTaxonGroupOtherInformation()
197    {
198        return this.taxonGroupOtherInformation;
199    }
200
201    /**
202     * Autre information sur l'espèce du produit.
203     * Utilisé dans SACROIS/RIC2, pour stocker des informations complémentaires issues du
204     * référentiel espèce du Réseau Inter Criée (RIC).
205     * @param taxonGroupOtherInformationIn String
206     */
207    public void setTaxonGroupOtherInformation(String taxonGroupOtherInformationIn)
208    {
209        this.taxonGroupOtherInformation = taxonGroupOtherInformationIn;
210    }
211
212    private Date controlDate;
213
214    /**
215     * 
216     * @return this.controlDate Date
217     */
218    public Date getControlDate()
219    {
220        return this.controlDate;
221    }
222
223    /**
224     * 
225     * @param controlDateIn Date
226     */
227    public void setControlDate(Date controlDateIn)
228    {
229        this.controlDate = controlDateIn;
230    }
231
232    private Date validationDate;
233
234    /**
235     * 
236     * @return this.validationDate Date
237     */
238    public Date getValidationDate()
239    {
240        return this.validationDate;
241    }
242
243    /**
244     * 
245     * @param validationDateIn Date
246     */
247    public void setValidationDate(Date validationDateIn)
248    {
249        this.validationDate = validationDateIn;
250    }
251
252    private Date qualificationDate;
253
254    /**
255     * 
256     * @return this.qualificationDate Date
257     */
258    public Date getQualificationDate()
259    {
260        return this.qualificationDate;
261    }
262
263    /**
264     * 
265     * @param qualificationDateIn Date
266     */
267    public void setQualificationDate(Date qualificationDateIn)
268    {
269        this.qualificationDate = qualificationDateIn;
270    }
271
272    private String qualificationComments;
273
274    /**
275     * 
276     * @return this.qualificationComments String
277     */
278    public String getQualificationComments()
279    {
280        return this.qualificationComments;
281    }
282
283    /**
284     * 
285     * @param qualificationCommentsIn String
286     */
287    public void setQualificationComments(String qualificationCommentsIn)
288    {
289        this.qualificationComments = qualificationCommentsIn;
290    }
291
292    private Float weight;
293
294    /**
295     * Poids total du lot/produit (en kg).
296     * Il peut s'agir d'une poids vif ou d'un poids brut, suivant si la la présence ou l'absence de
297     * l’état et de la présentation.
298     * @since 3.5.0
299     * @return this.weight Float
300     */
301    public Float getWeight()
302    {
303        return this.weight;
304    }
305
306    /**
307     * Poids total du lot/produit (en kg).
308     * Il peut s'agir d'une poids vif ou d'un poids brut, suivant si la la présence ou l'absence de
309     * l’état et de la présentation.
310     * @since 3.5.0
311     * @param weightIn Float
312     */
313    public void setWeight(Float weightIn)
314    {
315        this.weight = weightIn;
316    }
317
318    private Float cost;
319
320    /**
321     * Prix total, exprimé dans l'unité utilisée par du système SIH (€, DH, SR, ...)
322     * @since 3.5.0
323     * @return this.cost Float
324     */
325    public Float getCost()
326    {
327        return this.cost;
328    }
329
330    /**
331     * Prix total, exprimé dans l'unité utilisée par du système SIH (€, DH, SR, ...)
332     * @since 3.5.0
333     * @param costIn Float
334     */
335    public void setCost(Float costIn)
336    {
337        this.cost = costIn;
338    }
339
340    // Generate 23 associations
341    private TaxonGroup otherTaxonGroup;
342
343    /**
344     * <html>
345     * <head>
346     * <style>
347     * p {padding:0px; margin:0px;}
348     * </style>
349     * </head>
350     * <body>
351     * <p>
352     * Espèce du produit, de la classification BCS (espèce commerciale).
353     * </p>
354     * <p>
355     * &#160;
356     * </p>
357     * <p>
358     * Utile surtout pour les données historiques : <b>utilisation à éviter.</b>
359     * </p>
360     * </body>
361     * </html>
362     * @return this.otherTaxonGroup TaxonGroup
363     */
364    public TaxonGroup getOtherTaxonGroup()
365    {
366        return this.otherTaxonGroup;
367    }
368
369    /**
370     * <html>
371     * <head>
372     * <style>
373     * p {padding:0px; margin:0px;}
374     * </style>
375     * </head>
376     * <body>
377     * <p>
378     * Espèce du produit, de la classification BCS (espèce commerciale).
379     * </p>
380     * <p>
381     * &#160;
382     * </p>
383     * <p>
384     * Utile surtout pour les données historiques : <b>utilisation à éviter.</b>
385     * </p>
386     * </body>
387     * </html>
388     * @param otherTaxonGroupIn TaxonGroup
389     */
390    public void setOtherTaxonGroup(TaxonGroup otherTaxonGroupIn)
391    {
392        this.otherTaxonGroup = otherTaxonGroupIn;
393    }
394
395    private TaxonGroup taxonGroup;
396
397    /**
398     * Il s'agit d'une autre référence de l'espèce du produit, dans une autre classification
399     * d'espèce.
400     * Pour SACROIS/RIC2, on utilise en espèce secondaire la classification FAO.
401     * @return this.taxonGroup TaxonGroup
402     */
403    public TaxonGroup getTaxonGroup()
404    {
405        return this.taxonGroup;
406    }
407
408    /**
409     * Il s'agit d'une autre référence de l'espèce du produit, dans une autre classification
410     * d'espèce.
411     * Pour SACROIS/RIC2, on utilise en espèce secondaire la classification FAO.
412     * @param taxonGroupIn TaxonGroup
413     */
414    public void setTaxonGroup(TaxonGroup taxonGroupIn)
415    {
416        this.taxonGroup = taxonGroupIn;
417    }
418
419    private SaleType saleType;
420
421    /**
422     * <html>
423     * <head>
424     * <style>
425     * p {padding:0px; margin:0px;}
426     * </style>
427     * </head>
428     * <body>
429     * <p>
430     * Type de vente.
431     * </p>
432     * <p>
433     * &#160;
434     * </p>
435     * <p>
436     * Attention, mélange plusieurs aspects (comme le type de transaction, etc.).
437     * </p>
438     * <p>
439     * Utiliser plutôt TakeOverType, puis détailler les autres composantes directement dans Produce
440     * ou
441     * ProduceSortingMeasurement
442     * </p>
443     * <p>
444     * &#160;
445     * </p>
446     * <p>
447     * @deprecated Use instead TakeOverType
448     * </p>
449     * </body>
450     * </html>
451     * @return this.saleType SaleType
452     */
453    public SaleType getSaleType()
454    {
455        return this.saleType;
456    }
457
458    /**
459     * <html>
460     * <head>
461     * <style>
462     * p {padding:0px; margin:0px;}
463     * </style>
464     * </head>
465     * <body>
466     * <p>
467     * Type de vente.
468     * </p>
469     * <p>
470     * &#160;
471     * </p>
472     * <p>
473     * Attention, mélange plusieurs aspects (comme le type de transaction, etc.).
474     * </p>
475     * <p>
476     * Utiliser plutôt TakeOverType, puis détailler les autres composantes directement dans Produce
477     * ou
478     * ProduceSortingMeasurement
479     * </p>
480     * <p>
481     * &#160;
482     * </p>
483     * <p>
484     * @deprecated Use instead TakeOverType
485     * </p>
486     * </body>
487     * </html>
488     * @param saleTypeIn SaleType
489     */
490    public void setSaleType(SaleType saleTypeIn)
491    {
492        this.saleType = saleTypeIn;
493    }
494
495    private Gear otherGear;
496
497    /**
498     * <html>
499     * <head>
500     * <style>
501     * p {padding:0px; margin:0px;}
502     * </style>
503     * </head>
504     * <body>
505     * <p>
506     * L'engin <b>dans un référentiel</b> <b>distinct</b> que celui
507     * défini dans le programme de collecte.
508     * </p>
509     * <p>
510     * </p>
511     * <p>
512     * Cas d'utilisation :
513     * </p>
514     * <ul>
515     * <li>
516     * l'engin a été collecté dans deux référentiels distincts
517     * </li>
518     * <li>
519     * ou encore : l'engin collecté a été transcodé dans le référentiel
520     * actuel du SIH. (cas des donénes historiques provenant de Harmonie1 :
521     * le champ OTHER_GEAR_FK stocke l'engin CNTS tel que collecté, et
522     * GEAR_FK l'engin transcodé en FAO).
523     * </li>
524     * </ul>
525     * </body>
526     * </html>
527     * @return this.otherGear Gear
528     */
529    public Gear getOtherGear()
530    {
531        return this.otherGear;
532    }
533
534    /**
535     * <html>
536     * <head>
537     * <style>
538     * p {padding:0px; margin:0px;}
539     * </style>
540     * </head>
541     * <body>
542     * <p>
543     * L'engin <b>dans un référentiel</b> <b>distinct</b> que celui
544     * défini dans le programme de collecte.
545     * </p>
546     * <p>
547     * </p>
548     * <p>
549     * Cas d'utilisation :
550     * </p>
551     * <ul>
552     * <li>
553     * l'engin a été collecté dans deux référentiels distincts
554     * </li>
555     * <li>
556     * ou encore : l'engin collecté a été transcodé dans le référentiel
557     * actuel du SIH. (cas des donénes historiques provenant de Harmonie1 :
558     * le champ OTHER_GEAR_FK stocke l'engin CNTS tel que collecté, et
559     * GEAR_FK l'engin transcodé en FAO).
560     * </li>
561     * </ul>
562     * </body>
563     * </html>
564     * @param otherGearIn Gear
565     */
566    public void setOtherGear(Gear otherGearIn)
567    {
568        this.otherGear = otherGearIn;
569    }
570
571    private QualitativeValue dressing;
572
573    /**
574     * (valeur qualitative)
575     * @since 3.5.0
576     * @return this.dressing QualitativeValue
577     */
578    public QualitativeValue getDressing()
579    {
580        return this.dressing;
581    }
582
583    /**
584     * (valeur qualitative)
585     * @since 3.5.0
586     * @param dressingIn QualitativeValue
587     */
588    public void setDressing(QualitativeValue dressingIn)
589    {
590        this.dressing = dressingIn;
591    }
592
593    private QualitativeValue preservation;
594
595    /**
596     * (valeur qualitative)
597     * @since 3.5.0
598     * @return this.preservation QualitativeValue
599     */
600    public QualitativeValue getPreservation()
601    {
602        return this.preservation;
603    }
604
605    /**
606     * (valeur qualitative)
607     * @since 3.5.0
608     * @param preservationIn QualitativeValue
609     */
610    public void setPreservation(QualitativeValue preservationIn)
611    {
612        this.preservation = preservationIn;
613    }
614
615    private QualitativeValue sizeCategory;
616
617    /**
618     * Catégorie du lot. Valeur qualitative des paramètres :
619     * - "catégorie UE" (SIZE_UE_CAT)
620     * - "catégorie tri terrain" (SIZE_UNLI_CAT)
621     * @since 3.5.0
622     * @return this.sizeCategory QualitativeValue
623     */
624    public QualitativeValue getSizeCategory()
625    {
626        return this.sizeCategory;
627    }
628
629    /**
630     * Catégorie du lot. Valeur qualitative des paramètres :
631     * - "catégorie UE" (SIZE_UE_CAT)
632     * - "catégorie tri terrain" (SIZE_UNLI_CAT)
633     * @since 3.5.0
634     * @param sizeCategoryIn QualitativeValue
635     */
636    public void setSizeCategory(QualitativeValue sizeCategoryIn)
637    {
638        this.sizeCategory = sizeCategoryIn;
639    }
640
641    private QualitativeValue freshnessCategory;
642
643    /**
644     * Qualité (valeur qualitative)
645     * @since 3.5.0
646     * @return this.freshnessCategory QualitativeValue
647     */
648    public QualitativeValue getFreshnessCategory()
649    {
650        return this.freshnessCategory;
651    }
652
653    /**
654     * Qualité (valeur qualitative)
655     * @since 3.5.0
656     * @param freshnessCategoryIn QualitativeValue
657     */
658    public void setFreshnessCategory(QualitativeValue freshnessCategoryIn)
659    {
660        this.freshnessCategory = freshnessCategoryIn;
661    }
662
663    private Method weightMethod;
664
665    /**
666     * Method used to fill the weight value
667     * @since 3.5.0
668     * @return this.weightMethod Method
669     */
670    public Method getWeightMethod()
671    {
672        return this.weightMethod;
673    }
674
675    /**
676     * Method used to fill the weight value
677     * @since 3.5.0
678     * @param weightMethodIn Method
679     */
680    public void setWeightMethod(Method weightMethodIn)
681    {
682        this.weightMethod = weightMethodIn;
683    }
684
685    private QualitativeValue transaction;
686
687    /**
688     * Type de transaction
689     * @since 3.5.0
690     * @return this.transaction QualitativeValue
691     */
692    public QualitativeValue getTransaction()
693    {
694        return this.transaction;
695    }
696
697    /**
698     * Type de transaction
699     * @since 3.5.0
700     * @param transactionIn QualitativeValue
701     */
702    public void setTransaction(QualitativeValue transactionIn)
703    {
704        this.transaction = transactionIn;
705    }
706
707    private FishingOperation fishingOperation;
708
709    /**
710     * Opération de peche durant laquelle un prélèvement peut etre effectué, au cours d'une sortie
711     * en mer
712     * (marée observée en mer, marée enquetée au débarquement, sortie lors d'une campagne à la mer,
713     * etc.).
714     * Il peut également s'agir d'une séquence de peche, lorsque les dates début/fin ne sont pas
715     * connus, et
716     * si la zone de peche est unique.
717     * Les dates/heures et lat/long de début/fin caractérisent le début/fin de la capture réalisée
718     * (hors
719     * temps d'établissement de l'engin).
720     * REMARQUE : les caractéristiques "indicateur jour/nuit" et "Trajectoire rectiligne ou non"
721     * sont
722     * présent à ce niveau dans Harmonie, mais gérés dans Allegro via les "cracatéristique
723     * d'utilisation du
724     * navire" (VesselUseFeatures) rattachée à l'opération parente.
725     * @return this.fishingOperation FishingOperation
726     */
727    public FishingOperation getFishingOperation()
728    {
729        return this.fishingOperation;
730    }
731
732    /**
733     * Opération de peche durant laquelle un prélèvement peut etre effectué, au cours d'une sortie
734     * en mer
735     * (marée observée en mer, marée enquetée au débarquement, sortie lors d'une campagne à la mer,
736     * etc.).
737     * Il peut également s'agir d'une séquence de peche, lorsque les dates début/fin ne sont pas
738     * connus, et
739     * si la zone de peche est unique.
740     * Les dates/heures et lat/long de début/fin caractérisent le début/fin de la capture réalisée
741     * (hors
742     * temps d'établissement de l'engin).
743     * REMARQUE : les caractéristiques "indicateur jour/nuit" et "Trajectoire rectiligne ou non"
744     * sont
745     * présent à ce niveau dans Harmonie, mais gérés dans Allegro via les "cracatéristique
746     * d'utilisation du
747     * navire" (VesselUseFeatures) rattachée à l'opération parente.
748     * @param fishingOperationIn FishingOperation
749     */
750    public void setFishingOperation(FishingOperation fishingOperationIn)
751    {
752        this.fishingOperation = fishingOperationIn;
753    }
754
755    private Batch batch;
756
757    /**
758     * Lot d'origine du produit (Optionel)
759     * @return this.batch Batch
760     */
761    public Batch getBatch()
762    {
763        return this.batch;
764    }
765
766    /**
767     * Lot d'origine du produit (Optionel)
768     * @param batchIn Batch
769     */
770    public void setBatch(Batch batchIn)
771    {
772        this.batch = batchIn;
773    }
774
775    private Collection<ProduceSortingMeasurement> produceSortingMeasurements = new HashSet<ProduceSortingMeasurement>();
776
777    /**
778     * Mesures de quantification du produit (poids)
779     * @return this.produceSortingMeasurements Collection<ProduceSortingMeasurement>
780     */
781    public Collection<ProduceSortingMeasurement> getProduceSortingMeasurements()
782    {
783        return this.produceSortingMeasurements;
784    }
785
786    /**
787     * Mesures de quantification du produit (poids)
788     * @param produceSortingMeasurementsIn Collection<ProduceSortingMeasurement>
789     */
790    public void setProduceSortingMeasurements(Collection<ProduceSortingMeasurement> produceSortingMeasurementsIn)
791    {
792        this.produceSortingMeasurements = produceSortingMeasurementsIn;
793    }
794
795    /**
796     * Mesures de quantification du produit (poids)
797     * @param elementToAdd ProduceSortingMeasurement
798     * @return <tt>true</tt> if this collection changed as a result of the
799     *         call
800     */
801    public boolean addProduceSortingMeasurements(ProduceSortingMeasurement elementToAdd)
802    {
803        return this.produceSortingMeasurements.add(elementToAdd);
804    }
805
806    /**
807     * Mesures de quantification du produit (poids)
808     * @param elementToRemove ProduceSortingMeasurement
809     * @return <tt>true</tt> if this collection changed as a result of the
810     *         call
811     */
812    public boolean removeProduceSortingMeasurements(ProduceSortingMeasurement elementToRemove)
813    {
814        return this.produceSortingMeasurements.remove(elementToRemove);
815    }
816
817    private Collection<ProduceQuantificationMeasurement> produceQuantificationMeasurements = new HashSet<ProduceQuantificationMeasurement>();
818
819    /**
820     * Contient au moins les critère de classement suivants :
821     * - Présentation du produit (preserving)
822     * - Qualité du produit (quality)
823     * - Catégorie du produit (calibration)
824     * - Etat du produit (dressing)
825     * - Type de valorisation du produit de vente (optionnel) (valorization)
826     * - Prix,
827     * - etc.
828     * @return this.produceQuantificationMeasurements Collection<ProduceQuantificationMeasurement>
829     */
830    public Collection<ProduceQuantificationMeasurement> getProduceQuantificationMeasurements()
831    {
832        return this.produceQuantificationMeasurements;
833    }
834
835    /**
836     * Contient au moins les critère de classement suivants :
837     * - Présentation du produit (preserving)
838     * - Qualité du produit (quality)
839     * - Catégorie du produit (calibration)
840     * - Etat du produit (dressing)
841     * - Type de valorisation du produit de vente (optionnel) (valorization)
842     * - Prix,
843     * - etc.
844     * @param produceQuantificationMeasurementsIn Collection<ProduceQuantificationMeasurement>
845     */
846    public void setProduceQuantificationMeasurements(Collection<ProduceQuantificationMeasurement> produceQuantificationMeasurementsIn)
847    {
848        this.produceQuantificationMeasurements = produceQuantificationMeasurementsIn;
849    }
850
851    /**
852     * Contient au moins les critère de classement suivants :
853     * - Présentation du produit (preserving)
854     * - Qualité du produit (quality)
855     * - Catégorie du produit (calibration)
856     * - Etat du produit (dressing)
857     * - Type de valorisation du produit de vente (optionnel) (valorization)
858     * - Prix,
859     * - etc.
860     * @param elementToAdd ProduceQuantificationMeasurement
861     * @return <tt>true</tt> if this collection changed as a result of the
862     *         call
863     */
864    public boolean addProduceQuantificationMeasurements(ProduceQuantificationMeasurement elementToAdd)
865    {
866        return this.produceQuantificationMeasurements.add(elementToAdd);
867    }
868
869    /**
870     * Contient au moins les critère de classement suivants :
871     * - Présentation du produit (preserving)
872     * - Qualité du produit (quality)
873     * - Catégorie du produit (calibration)
874     * - Etat du produit (dressing)
875     * - Type de valorisation du produit de vente (optionnel) (valorization)
876     * - Prix,
877     * - etc.
878     * @param elementToRemove ProduceQuantificationMeasurement
879     * @return <tt>true</tt> if this collection changed as a result of the
880     *         call
881     */
882    public boolean removeProduceQuantificationMeasurements(ProduceQuantificationMeasurement elementToRemove)
883    {
884        return this.produceQuantificationMeasurements.remove(elementToRemove);
885    }
886
887    private QualityFlag qualityFlag;
888
889    /**
890     * Niveau de qualité de la donnée.
891     * "Non qualifiée" par défaut
892     * @return this.qualityFlag QualityFlag
893     */
894    public QualityFlag getQualityFlag()
895    {
896        return this.qualityFlag;
897    }
898
899    /**
900     * Niveau de qualité de la donnée.
901     * "Non qualifiée" par défaut
902     * @param qualityFlagIn QualityFlag
903     */
904    public void setQualityFlag(QualityFlag qualityFlagIn)
905    {
906        this.qualityFlag = qualityFlagIn;
907    }
908
909    private Landing landing;
910
911    /**
912     * Information sur le débarquement du produit.
913     * @return this.landing Landing
914     */
915    public Landing getLanding()
916    {
917        return this.landing;
918    }
919
920    /**
921     * Information sur le débarquement du produit.
922     * @param landingIn Landing
923     */
924    public void setLanding(Landing landingIn)
925    {
926        this.landing = landingIn;
927    }
928
929    private Sale sale;
930
931    /**
932     * Vente liée à un navire, effectuée en un lieu et une date données. Une vente regroupe
933     * plusieurs
934     * produits vendus (Produce).
935     * Attention : une vente est ponctuelle dans le temps. Si l'on souhaite recencer une vente qui
936     * s'étale
937     * sur plusieurs jours,
938     * @return this.sale Sale
939     */
940    public Sale getSale()
941    {
942        return this.sale;
943    }
944
945    /**
946     * Vente liée à un navire, effectuée en un lieu et une date données. Une vente regroupe
947     * plusieurs
948     * produits vendus (Produce).
949     * Attention : une vente est ponctuelle dans le temps. Si l'on souhaite recencer une vente qui
950     * s'étale
951     * sur plusieurs jours,
952     * @param saleIn Sale
953     */
954    public void setSale(Sale saleIn)
955    {
956        this.sale = saleIn;
957    }
958
959    private Gear gear;
960
961    /**
962     * Engin de peche principal (groupe d'engin) ayant servi à prélever le produit en mer.
963     * @return this.gear Gear
964     */
965    public Gear getGear()
966    {
967        return this.gear;
968    }
969
970    /**
971     * Engin de peche principal (groupe d'engin) ayant servi à prélever le produit en mer.
972     * @param gearIn Gear
973     */
974    public void setGear(Gear gearIn)
975    {
976        this.gear = gearIn;
977    }
978
979    private TakeOver takeOver;
980
981    /**
982     * Prise en charge, d'une marée ou d'un débarquement, par un organisme (Seller) chargé de mettre
983     * en
984     * vente les produits débarqués.
985     * @return this.takeOver TakeOver
986     */
987    public TakeOver getTakeOver()
988    {
989        return this.takeOver;
990    }
991
992    /**
993     * Prise en charge, d'une marée ou d'un débarquement, par un organisme (Seller) chargé de mettre
994     * en
995     * vente les produits débarqués.
996     * @param takeOverIn TakeOver
997     */
998    public void setTakeOver(TakeOver takeOverIn)
999    {
1000        this.takeOver = takeOverIn;
1001    }
1002
1003    private Buyer buyer;
1004
1005    /**
1006     * 
1007     * @return this.buyer Buyer
1008     */
1009    public Buyer getBuyer()
1010    {
1011        return this.buyer;
1012    }
1013
1014    /**
1015     * 
1016     * @param buyerIn Buyer
1017     */
1018    public void setBuyer(Buyer buyerIn)
1019    {
1020        this.buyer = buyerIn;
1021    }
1022
1023    private Collection<FishingArea> fishingAreas = new HashSet<FishingArea>();
1024
1025    /**
1026     * Lieu d'origine du produit (en mer).
1027     * Au minimum la zone FAO, ou plus précis (sous-zone FAO, etc.).
1028     * @return this.fishingAreas Collection<FishingArea>
1029     */
1030    public Collection<FishingArea> getFishingAreas()
1031    {
1032        return this.fishingAreas;
1033    }
1034
1035    /**
1036     * Lieu d'origine du produit (en mer).
1037     * Au minimum la zone FAO, ou plus précis (sous-zone FAO, etc.).
1038     * @param fishingAreasIn Collection<FishingArea>
1039     */
1040    public void setFishingAreas(Collection<FishingArea> fishingAreasIn)
1041    {
1042        this.fishingAreas = fishingAreasIn;
1043    }
1044
1045    /**
1046     * Lieu d'origine du produit (en mer).
1047     * Au minimum la zone FAO, ou plus précis (sous-zone FAO, etc.).
1048     * @param elementToAdd FishingArea
1049     * @return <tt>true</tt> if this collection changed as a result of the
1050     *         call
1051     */
1052    public boolean addFishingAreas(FishingArea elementToAdd)
1053    {
1054        return this.fishingAreas.add(elementToAdd);
1055    }
1056
1057    /**
1058     * Lieu d'origine du produit (en mer).
1059     * Au minimum la zone FAO, ou plus précis (sous-zone FAO, etc.).
1060     * @param elementToRemove FishingArea
1061     * @return <tt>true</tt> if this collection changed as a result of the
1062     *         call
1063     */
1064    public boolean removeFishingAreas(FishingArea elementToRemove)
1065    {
1066        return this.fishingAreas.remove(elementToRemove);
1067    }
1068
1069    private Transshipment transshipment;
1070
1071    /**
1072     * Transbordement d'un produit (capturé) d'un navire à l'autre.
1073     * Pour connaitre le navire d'origine des produits (celui qui les possédait avant le
1074     * transbordement),
1075     * il faut utiliser les liens vers FishingTrip ou MetaFishingTrip, qui possèdent un lien vers
1076     * Vessel.
1077     * @return this.transshipment Transshipment
1078     */
1079    public Transshipment getTransshipment()
1080    {
1081        return this.transshipment;
1082    }
1083
1084    /**
1085     * Transbordement d'un produit (capturé) d'un navire à l'autre.
1086     * Pour connaitre le navire d'origine des produits (celui qui les possédait avant le
1087     * transbordement),
1088     * il faut utiliser les liens vers FishingTrip ou MetaFishingTrip, qui possèdent un lien vers
1089     * Vessel.
1090     * @param transshipmentIn Transshipment
1091     */
1092    public void setTransshipment(Transshipment transshipmentIn)
1093    {
1094        this.transshipment = transshipmentIn;
1095    }
1096
1097    private ExpectedSale expectedSale;
1098
1099    /**
1100     * Mode de vente escompté (d’une marée observée ou d'un débarquement observé).
1101     * @return this.expectedSale ExpectedSale
1102     */
1103    public ExpectedSale getExpectedSale()
1104    {
1105        return this.expectedSale;
1106    }
1107
1108    /**
1109     * Mode de vente escompté (d’une marée observée ou d'un débarquement observé).
1110     * @param expectedSaleIn ExpectedSale
1111     */
1112    public void setExpectedSale(ExpectedSale expectedSaleIn)
1113    {
1114        this.expectedSale = expectedSaleIn;
1115    }
1116
1117    /**
1118     * Returns <code>true</code> if the argument is an Produce instance and all identifiers for this entity
1119     * equal the identifiers of the argument entity. Returns <code>false</code> otherwise.
1120     */
1121    @Override
1122    public boolean equals(Object object)
1123    {
1124        if (this == object)
1125        {
1126            return true;
1127        }
1128        if (!(object instanceof Produce))
1129        {
1130            return false;
1131        }
1132        final Produce that = (Produce)object;
1133        if (this.id == null || that.getId() == null || !this.id.equals(that.getId()))
1134        {
1135            return false;
1136        }
1137        return true;
1138    }
1139
1140    /**
1141     * Returns a hash code based on this entity's identifiers.
1142     */
1143    @Override
1144    public int hashCode()
1145    {
1146        int hashCode = 0;
1147        hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode());
1148
1149        return hashCode;
1150    }
1151
1152    /**
1153     * Constructs new instances of {@link Produce}.
1154     */
1155    public static final class Factory
1156    {
1157        /**
1158         * Constructs a new instance of {@link Produce}.
1159         * @return new ProduceImpl()
1160         */
1161        public static Produce newInstance()
1162        {
1163            return new ProduceImpl();
1164        }
1165
1166        /**
1167         * Constructs a new instance of {@link Produce}, taking all required and/or
1168         * read-only properties as arguments, except for identifiers.
1169         * @param isDiscard Boolean
1170         * @param taxonGroup TaxonGroup
1171         * @param produceQuantificationMeasurements Collection<ProduceQuantificationMeasurement>
1172         * @param qualityFlag QualityFlag
1173         * @return newInstance
1174         */
1175        public static Produce newInstance(Boolean isDiscard, TaxonGroup taxonGroup, Collection<ProduceQuantificationMeasurement> produceQuantificationMeasurements, QualityFlag qualityFlag)
1176        {
1177            final Produce entity = new ProduceImpl();
1178            entity.setIsDiscard(isDiscard);
1179            entity.setTaxonGroup(taxonGroup);
1180            entity.setProduceQuantificationMeasurements(produceQuantificationMeasurements);
1181            entity.setQualityFlag(qualityFlag);
1182            return entity;
1183        }
1184
1185        /**
1186         * Constructs a new instance of {@link Produce}, taking all possible properties
1187         * (except the identifier(s))as arguments.
1188         * @param isDiscard Boolean
1189         * @param subgroupCount Float
1190         * @param individualCount Short
1191         * @param taxonGroupOtherInformation String
1192         * @param controlDate Date
1193         * @param validationDate Date
1194         * @param qualificationDate Date
1195         * @param qualificationComments String
1196         * @param weight Float
1197         * @param cost Float
1198         * @param otherTaxonGroup TaxonGroup
1199         * @param taxonGroup TaxonGroup
1200         * @param saleType SaleType
1201         * @param otherGear Gear
1202         * @param dressing QualitativeValue
1203         * @param preservation QualitativeValue
1204         * @param sizeCategory QualitativeValue
1205         * @param freshnessCategory QualitativeValue
1206         * @param weightMethod Method
1207         * @param transaction QualitativeValue
1208         * @param fishingOperation FishingOperation
1209         * @param batch Batch
1210         * @param produceSortingMeasurements Collection<ProduceSortingMeasurement>
1211         * @param produceQuantificationMeasurements Collection<ProduceQuantificationMeasurement>
1212         * @param qualityFlag QualityFlag
1213         * @param landing Landing
1214         * @param sale Sale
1215         * @param gear Gear
1216         * @param takeOver TakeOver
1217         * @param buyer Buyer
1218         * @param fishingAreas Collection<FishingArea>
1219         * @param transshipment Transshipment
1220         * @param expectedSale ExpectedSale
1221         * @return newInstance Produce
1222         */
1223        public static Produce newInstance(Boolean isDiscard, Float subgroupCount, Short individualCount, String taxonGroupOtherInformation, Date controlDate, Date validationDate, Date qualificationDate, String qualificationComments, Float weight, Float cost, TaxonGroup otherTaxonGroup, TaxonGroup taxonGroup, SaleType saleType, Gear otherGear, QualitativeValue dressing, QualitativeValue preservation, QualitativeValue sizeCategory, QualitativeValue freshnessCategory, Method weightMethod, QualitativeValue transaction, FishingOperation fishingOperation, Batch batch, Collection<ProduceSortingMeasurement> produceSortingMeasurements, Collection<ProduceQuantificationMeasurement> produceQuantificationMeasurements, QualityFlag qualityFlag, Landing landing, Sale sale, Gear gear, TakeOver takeOver, Buyer buyer, Collection<FishingArea> fishingAreas, Transshipment transshipment, ExpectedSale expectedSale)
1224        {
1225            final Produce entity = new ProduceImpl();
1226            entity.setIsDiscard(isDiscard);
1227            entity.setSubgroupCount(subgroupCount);
1228            entity.setIndividualCount(individualCount);
1229            entity.setTaxonGroupOtherInformation(taxonGroupOtherInformation);
1230            entity.setControlDate(controlDate);
1231            entity.setValidationDate(validationDate);
1232            entity.setQualificationDate(qualificationDate);
1233            entity.setQualificationComments(qualificationComments);
1234            entity.setWeight(weight);
1235            entity.setCost(cost);
1236            entity.setOtherTaxonGroup(otherTaxonGroup);
1237            entity.setTaxonGroup(taxonGroup);
1238            entity.setSaleType(saleType);
1239            entity.setOtherGear(otherGear);
1240            entity.setDressing(dressing);
1241            entity.setPreservation(preservation);
1242            entity.setSizeCategory(sizeCategory);
1243            entity.setFreshnessCategory(freshnessCategory);
1244            entity.setWeightMethod(weightMethod);
1245            entity.setTransaction(transaction);
1246            entity.setFishingOperation(fishingOperation);
1247            entity.setBatch(batch);
1248            entity.setProduceSortingMeasurements(produceSortingMeasurements);
1249            entity.setProduceQuantificationMeasurements(produceQuantificationMeasurements);
1250            entity.setQualityFlag(qualityFlag);
1251            entity.setLanding(landing);
1252            entity.setSale(sale);
1253            entity.setGear(gear);
1254            entity.setTakeOver(takeOver);
1255            entity.setBuyer(buyer);
1256            entity.setFishingAreas(fishingAreas);
1257            entity.setTransshipment(transshipment);
1258            entity.setExpectedSale(expectedSale);
1259            return entity;
1260        }
1261    }
1262
1263    /**
1264     * @see Comparable#compareTo
1265     */
1266    public int compareTo(Produce o)
1267    {
1268        int cmp = 0;
1269        if (this.getId() != null)
1270        {
1271            cmp = this.getId().compareTo(o.getId());
1272        }
1273        else
1274        {
1275            if (this.isIsDiscard() != null)
1276            {
1277                cmp = (cmp != 0 ? cmp : this.isIsDiscard().compareTo(o.isIsDiscard()));
1278            }
1279            if (this.getSubgroupCount() != null)
1280            {
1281                cmp = (cmp != 0 ? cmp : this.getSubgroupCount().compareTo(o.getSubgroupCount()));
1282            }
1283            if (this.getIndividualCount() != null)
1284            {
1285                cmp = (cmp != 0 ? cmp : this.getIndividualCount().compareTo(o.getIndividualCount()));
1286            }
1287            if (this.getTaxonGroupOtherInformation() != null)
1288            {
1289                cmp = (cmp != 0 ? cmp : this.getTaxonGroupOtherInformation().compareTo(o.getTaxonGroupOtherInformation()));
1290            }
1291            if (this.getControlDate() != null)
1292            {
1293                cmp = (cmp != 0 ? cmp : this.getControlDate().compareTo(o.getControlDate()));
1294            }
1295            if (this.getValidationDate() != null)
1296            {
1297                cmp = (cmp != 0 ? cmp : this.getValidationDate().compareTo(o.getValidationDate()));
1298            }
1299            if (this.getQualificationDate() != null)
1300            {
1301                cmp = (cmp != 0 ? cmp : this.getQualificationDate().compareTo(o.getQualificationDate()));
1302            }
1303            if (this.getQualificationComments() != null)
1304            {
1305                cmp = (cmp != 0 ? cmp : this.getQualificationComments().compareTo(o.getQualificationComments()));
1306            }
1307            if (this.getWeight() != null)
1308            {
1309                cmp = (cmp != 0 ? cmp : this.getWeight().compareTo(o.getWeight()));
1310            }
1311            if (this.getCost() != null)
1312            {
1313                cmp = (cmp != 0 ? cmp : this.getCost().compareTo(o.getCost()));
1314            }
1315        }
1316        return cmp;
1317    }
1318// HibernateEntity.vsl merge-point
1319// Produce.java merge-point
1320}