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.measure;
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.administration.user.Department;
032import fr.ifremer.adagio.core.dao.data.vessel.feature.person.VesselPersonFeatures;
033import fr.ifremer.adagio.core.dao.referential.AnalysisInstrument;
034import fr.ifremer.adagio.core.dao.referential.NumericalPrecision;
035import fr.ifremer.adagio.core.dao.referential.PrecisionType;
036import fr.ifremer.adagio.core.dao.referential.QualityFlag;
037import fr.ifremer.adagio.core.dao.referential.pmfm.AggregationLevel;
038import fr.ifremer.adagio.core.dao.referential.pmfm.Pmfm;
039import fr.ifremer.adagio.core.dao.referential.pmfm.QualitativeValue;
040import java.util.Date;
041
042/**
043 * 
044 */
045// HibernateEntity.vsl annotations merge-point
046public abstract class VesselPersonMeasurement
047    extends MeasurementImpl
048{
049    /**
050     * The serial version UID of this class. Needed for serialization.
051     */
052    private static final long serialVersionUID = 757480915407728887L;
053
054    // Generate 0 attributes
055    // Generate 1 associations
056    private VesselPersonFeatures vesselPersonFeatures;
057
058    /**
059     * <html>
060     * <head>
061     * <style>
062     * p {padding:0px; margin:0px;}
063     * </style>
064     * </head>
065     * <body>
066     * <p>
067     * Caractéristiques d'une personne physique en relation avec un Vessel
068     * (usager), pour une période.
069     * </p>
070     * <p>
071     * </p>
072     * <p>
073     * Dans tous les cas, il s'agit bien d'une personne physique, et <b>jamais
074     * d'un regroupement de plusieurs personnes</b>. Ainsi, des variables comme
075     * le &quot;<i>nombre d'hommes à bord</i>&quot; ne sera pas stocké ici,
076     * mais plutot dans <i>VesselUseFeatures</i>/<i>VesselUseMesurement</i>.
077     * </p>
078     * </body>
079     * </html>
080     * @return this.vesselPersonFeatures VesselPersonFeatures
081     */
082    public VesselPersonFeatures getVesselPersonFeatures()
083    {
084        return this.vesselPersonFeatures;
085    }
086
087    /**
088     * <html>
089     * <head>
090     * <style>
091     * p {padding:0px; margin:0px;}
092     * </style>
093     * </head>
094     * <body>
095     * <p>
096     * Caractéristiques d'une personne physique en relation avec un Vessel
097     * (usager), pour une période.
098     * </p>
099     * <p>
100     * </p>
101     * <p>
102     * Dans tous les cas, il s'agit bien d'une personne physique, et <b>jamais
103     * d'un regroupement de plusieurs personnes</b>. Ainsi, des variables comme
104     * le &quot;<i>nombre d'hommes à bord</i>&quot; ne sera pas stocké ici,
105     * mais plutot dans <i>VesselUseFeatures</i>/<i>VesselUseMesurement</i>.
106     * </p>
107     * </body>
108     * </html>
109     * @param vesselPersonFeaturesIn VesselPersonFeatures
110     */
111    public void setVesselPersonFeatures(VesselPersonFeatures vesselPersonFeaturesIn)
112    {
113        this.vesselPersonFeatures = vesselPersonFeaturesIn;
114    }
115
116    /**
117     * This entity does not have any identifiers
118     * but since it extends the <code>MeasurementImpl</code> class
119     * it will simply delegate the call up there.
120     *
121     * @see fr.ifremer.adagio.core.dao.data.measure.Measurement#equals(Object)
122     */
123    @Override
124    public boolean equals(Object object)
125    {
126        return super.equals(object);
127    }
128
129    /**
130     * This entity does not have any identifiers
131     * but since it extends the <code>MeasurementImpl</code> class
132     * it will simply delegate the call up there.
133     *
134     * @see fr.ifremer.adagio.core.dao.data.measure.Measurement#hashCode()
135     */
136    @Override
137    public int hashCode()
138    {
139        return super.hashCode();
140    }
141
142    /**
143     * Constructs new instances of {@link VesselPersonMeasurement}.
144     */
145    public static final class Factory
146    {
147        /**
148         * Constructs a new instance of {@link VesselPersonMeasurement}.
149         * @return new VesselPersonMeasurementImpl()
150         */
151        public static VesselPersonMeasurement newInstance()
152        {
153            return new VesselPersonMeasurementImpl();
154        }
155
156        /**
157         * Constructs a new instance of {@link VesselPersonMeasurement}, taking all required and/or
158         * read-only properties as arguments, except for identifiers.
159         * @param qualityFlag QualityFlag
160         * @param pmfm Pmfm
161         * @param vesselPersonFeatures VesselPersonFeatures
162         * @return newInstance
163         */
164        public static VesselPersonMeasurement newInstance(QualityFlag qualityFlag, Pmfm pmfm, VesselPersonFeatures vesselPersonFeatures)
165        {
166            final VesselPersonMeasurement entity = new VesselPersonMeasurementImpl();
167            entity.setQualityFlag(qualityFlag);
168            entity.setPmfm(pmfm);
169            entity.setVesselPersonFeatures(vesselPersonFeatures);
170            return entity;
171        }
172
173        /**
174         * Constructs a new instance of {@link VesselPersonMeasurement}, taking all possible properties
175         * (except the identifier(s))as arguments.
176         * @param numericalValue Float
177         * @param alphanumericalValue String
178         * @param digitCount Integer
179         * @param precisionValue Float
180         * @param controlDate Date
181         * @param validationDate Date
182         * @param qualificationDate Date
183         * @param qualificationComments String
184         * @param aggregationLevel AggregationLevel
185         * @param qualitativeValue QualitativeValue
186         * @param qualityFlag QualityFlag
187         * @param precisionType PrecisionType
188         * @param analysisInstrument AnalysisInstrument
189         * @param pmfm Pmfm
190         * @param department Department
191         * @param numericalPrecision NumericalPrecision
192         * @param vesselPersonFeatures VesselPersonFeatures
193         * @return newInstance VesselPersonMeasurement
194         */
195        public static VesselPersonMeasurement newInstance(Float numericalValue, String alphanumericalValue, Integer digitCount, Float precisionValue, Date controlDate, Date validationDate, Date qualificationDate, String qualificationComments, AggregationLevel aggregationLevel, QualitativeValue qualitativeValue, QualityFlag qualityFlag, PrecisionType precisionType, AnalysisInstrument analysisInstrument, Pmfm pmfm, Department department, NumericalPrecision numericalPrecision, VesselPersonFeatures vesselPersonFeatures)
196        {
197            final VesselPersonMeasurement entity = new VesselPersonMeasurementImpl();
198            entity.setNumericalValue(numericalValue);
199            entity.setAlphanumericalValue(alphanumericalValue);
200            entity.setDigitCount(digitCount);
201            entity.setPrecisionValue(precisionValue);
202            entity.setControlDate(controlDate);
203            entity.setValidationDate(validationDate);
204            entity.setQualificationDate(qualificationDate);
205            entity.setQualificationComments(qualificationComments);
206            entity.setAggregationLevel(aggregationLevel);
207            entity.setQualitativeValue(qualitativeValue);
208            entity.setQualityFlag(qualityFlag);
209            entity.setPrecisionType(precisionType);
210            entity.setAnalysisInstrument(analysisInstrument);
211            entity.setPmfm(pmfm);
212            entity.setDepartment(department);
213            entity.setNumericalPrecision(numericalPrecision);
214            entity.setVesselPersonFeatures(vesselPersonFeatures);
215            return entity;
216        }
217    }
218
219    /**
220     * @see Comparable#compareTo
221     */
222    public int compareTo(VesselPersonMeasurement o)
223    {
224        int cmp = 0;
225        if (this.getId() != null)
226        {
227            cmp = this.getId().compareTo(o.getId());
228        }
229        return cmp;
230    }
231// HibernateEntity.vsl merge-point
232// VesselPersonMeasurement.java merge-point
233}