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.use.GearUseFeatures;
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 GearUseMeasurement
047    extends MeasurementImpl
048{
049    /**
050     * The serial version UID of this class. Needed for serialization.
051     */
052    private static final long serialVersionUID = 4462466354869087920L;
053
054    // Generate 0 attributes
055    // Generate 1 associations
056    private GearUseFeatures gearUseFeatures;
057
058    /**
059     * Paramètre de mise en oeuvre de l'engin durant une opération.
060     * Exemple de paramètre de mise en oeuvre:
061     * • nombre de boués,
062     * • type de panneau,
063     * • présence d'un racasseur,
064     * • nombre de casier.
065     * mais aussi :
066     * • profondeur moyenne de l'engin,
067     * • vitesse de traine moyenne
068     * • ouverture du chalut
069     * @return this.gearUseFeatures GearUseFeatures
070     */
071    public GearUseFeatures getGearUseFeatures()
072    {
073        return this.gearUseFeatures;
074    }
075
076    /**
077     * Paramètre de mise en oeuvre de l'engin durant une opération.
078     * Exemple de paramètre de mise en oeuvre:
079     * • nombre de boués,
080     * • type de panneau,
081     * • présence d'un racasseur,
082     * • nombre de casier.
083     * mais aussi :
084     * • profondeur moyenne de l'engin,
085     * • vitesse de traine moyenne
086     * • ouverture du chalut
087     * @param gearUseFeaturesIn GearUseFeatures
088     */
089    public void setGearUseFeatures(GearUseFeatures gearUseFeaturesIn)
090    {
091        this.gearUseFeatures = gearUseFeaturesIn;
092    }
093
094    /**
095     * This entity does not have any identifiers
096     * but since it extends the <code>MeasurementImpl</code> class
097     * it will simply delegate the call up there.
098     *
099     * @see fr.ifremer.adagio.core.dao.data.measure.Measurement#equals(Object)
100     */
101    @Override
102    public boolean equals(Object object)
103    {
104        return super.equals(object);
105    }
106
107    /**
108     * This entity does not have any identifiers
109     * but since it extends the <code>MeasurementImpl</code> class
110     * it will simply delegate the call up there.
111     *
112     * @see fr.ifremer.adagio.core.dao.data.measure.Measurement#hashCode()
113     */
114    @Override
115    public int hashCode()
116    {
117        return super.hashCode();
118    }
119
120    /**
121     * Constructs new instances of {@link GearUseMeasurement}.
122     */
123    public static final class Factory
124    {
125        /**
126         * Constructs a new instance of {@link GearUseMeasurement}.
127         * @return new GearUseMeasurementImpl()
128         */
129        public static GearUseMeasurement newInstance()
130        {
131            return new GearUseMeasurementImpl();
132        }
133
134        /**
135         * Constructs a new instance of {@link GearUseMeasurement}, taking all required and/or
136         * read-only properties as arguments, except for identifiers.
137         * @param qualityFlag QualityFlag
138         * @param pmfm Pmfm
139         * @param gearUseFeatures GearUseFeatures
140         * @return newInstance
141         */
142        public static GearUseMeasurement newInstance(QualityFlag qualityFlag, Pmfm pmfm, GearUseFeatures gearUseFeatures)
143        {
144            final GearUseMeasurement entity = new GearUseMeasurementImpl();
145            entity.setQualityFlag(qualityFlag);
146            entity.setPmfm(pmfm);
147            entity.setGearUseFeatures(gearUseFeatures);
148            return entity;
149        }
150
151        /**
152         * Constructs a new instance of {@link GearUseMeasurement}, taking all possible properties
153         * (except the identifier(s))as arguments.
154         * @param numericalValue Float
155         * @param alphanumericalValue String
156         * @param digitCount Integer
157         * @param precisionValue Float
158         * @param controlDate Date
159         * @param validationDate Date
160         * @param qualificationDate Date
161         * @param qualificationComments String
162         * @param aggregationLevel AggregationLevel
163         * @param qualitativeValue QualitativeValue
164         * @param qualityFlag QualityFlag
165         * @param precisionType PrecisionType
166         * @param analysisInstrument AnalysisInstrument
167         * @param pmfm Pmfm
168         * @param department Department
169         * @param numericalPrecision NumericalPrecision
170         * @param gearUseFeatures GearUseFeatures
171         * @return newInstance GearUseMeasurement
172         */
173        public static GearUseMeasurement 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, GearUseFeatures gearUseFeatures)
174        {
175            final GearUseMeasurement entity = new GearUseMeasurementImpl();
176            entity.setNumericalValue(numericalValue);
177            entity.setAlphanumericalValue(alphanumericalValue);
178            entity.setDigitCount(digitCount);
179            entity.setPrecisionValue(precisionValue);
180            entity.setControlDate(controlDate);
181            entity.setValidationDate(validationDate);
182            entity.setQualificationDate(qualificationDate);
183            entity.setQualificationComments(qualificationComments);
184            entity.setAggregationLevel(aggregationLevel);
185            entity.setQualitativeValue(qualitativeValue);
186            entity.setQualityFlag(qualityFlag);
187            entity.setPrecisionType(precisionType);
188            entity.setAnalysisInstrument(analysisInstrument);
189            entity.setPmfm(pmfm);
190            entity.setDepartment(department);
191            entity.setNumericalPrecision(numericalPrecision);
192            entity.setGearUseFeatures(gearUseFeatures);
193            return entity;
194        }
195    }
196
197    /**
198     * @see Comparable#compareTo
199     */
200    public int compareTo(GearUseMeasurement o)
201    {
202        int cmp = 0;
203        if (this.getId() != null)
204        {
205            cmp = this.getId().compareTo(o.getId());
206        }
207        return cmp;
208    }
209// HibernateEntity.vsl merge-point
210// GearUseMeasurement.java merge-point
211}