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