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