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