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.vessel; 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.referential.pmfm.QualitativeValue; 032import java.io.Serializable; 033import java.util.Date; 034 035/** 036 * <html> 037 * <head> 038 * <style> 039 * p {padding:0px; margin:0px;} 040 * </style> 041 * </head> 042 * <body> 043 * <p> 044 * Evènement d'entrée ou sortie de flotte (entrée ou sortie du registre des 045 * navires). 046 * </p> 047 * <p> 048 * </p> 049 * <p> 050 * Par exemple : 051 * </p> 052 * <ul> 053 * <li> 054 * Pour le flux FPC : 055 * </li> 056 * </ul> 057 * <!--StartFragment--> 058 * <div style="color:rgb(0, 0, 059 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255, 060 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;"> 061 * <p style="margin-left:50.0px;"> 062 * IMP<span style="white-space:pre-wrap;"> </span>Importation 063 * </p> 064 * </div> 065 * <div style="color:rgb(0, 0, 066 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255, 067 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;"> 068 * <p style="margin-left:50.0px;"> 069 * CHA<span style="white-space:pre-wrap;"> </span>Entrée dans le FPC 070 * </p> 071 * </div> 072 * <div style="color:rgb(0, 0, 073 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255, 074 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;"> 075 * <p style="margin-left:50.0px;"> 076 * CST<span style="white-space:pre-wrap;"> </span>Construction 077 * </p> 078 * </div> 079 * <div style="color:rgb(0, 0, 080 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255, 081 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;"> 082 * <p style="margin-left:50.0px;"> 083 * EXP<span style="white-space:pre-wrap;"> </span>Exportation 084 * </p> 085 * </div> 086 * <div style="color:rgb(0, 0, 087 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255, 088 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;"> 089 * <p style="margin-left:50.0px;"> 090 * COR<span style="white-space:pre-wrap;"> </span>Correction 091 * </p> 092 * </div> 093 * <div style="color:rgb(0, 0, 094 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255, 095 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;"> 096 * <p style="margin-left:50.0px;"> 097 * RET<span style="white-space:pre-wrap;"> </span>Retrait du FPC 098 * </p> 099 * </div> 100 * <div style="color:rgb(0, 0, 101 * 0);white-space:normal;font-size:13px;text-indent:0px;font-weight:normal;letter-spacing:normal;font-variant:normal;word-spacing:0px;text-align:-webkit-auto;font-style:normal;background-color:rgb(255, 102 * 255, 255);line-height:normal;font-family:arial, sans-serif;text-transform:none;"> 103 * <p style="margin-left:50.0px;"> 104 * DES<span style="white-space:pre-wrap;"> </span>Destruction 105 * </p> 106 * </div> 107 * <div style="font-size:13px;font-style:normal;font-variant:normal;color:rgb(0, 0, 108 * 0);font-family:arial, sans-serif;"> 109 * </div> 110 * </body> 111 * </html> 112 */ 113// HibernateEntity.vsl annotations merge-point 114public abstract class VesselFleetEvent 115 implements Serializable, Comparable<VesselFleetEvent> 116{ 117 /** 118 * The serial version UID of this class. Needed for serialization. 119 */ 120 private static final long serialVersionUID = -5393265792266755596L; 121 122 private VesselFleetEventPK vesselFleetEventPk; 123 124 /** 125 * Get the composite primary key identifier class 126 * @return vesselFleetEventPk 127 */ 128 public VesselFleetEventPK getVesselFleetEventPk() 129 { 130 return this.vesselFleetEventPk; 131 } 132 133 /** 134 * Set the composite primary key identifier class 135 * @param vesselFleetEventPkIn 136 */ 137 public void setVesselFleetEventPk(VesselFleetEventPK vesselFleetEventPkIn) { 138 this.vesselFleetEventPk = vesselFleetEventPkIn; 139 } 140 141 // Generate 2 attributes 142 /** 143 * 144 * @return this.eventDate Date 145 */ 146 public Date getEventDate() 147 { 148 return this.getVesselFleetEventPk().getEventDate(); 149 } 150 151 /** 152 * 153 * @param eventDateIn Date 154 */ 155 public void setEventDate(Date eventDateIn) 156 { 157 this.getVesselFleetEventPk().setEventDate(eventDateIn); 158 } 159 160 /** 161 * Ajout pour gérer les regsitre de navires (hors registre consolidé) ou des doublons peuvent 162 * exister. 163 * mantis #14112 164 * @return this.rankOrder Short 165 */ 166 public Short getRankOrder() 167 { 168 return this.getVesselFleetEventPk().getRankOrder(); 169 } 170 171 /** 172 * Ajout pour gérer les regsitre de navires (hors registre consolidé) ou des doublons peuvent 173 * exister. 174 * mantis #14112 175 * @param rankOrderIn Short 176 */ 177 public void setRankOrder(Short rankOrderIn) 178 { 179 this.getVesselFleetEventPk().setRankOrder(rankOrderIn); 180 } 181 182 // Generate 2 associations 183 private Vessel vessel; 184 185 /** 186 * Navire, ou plus généralement un usager de la ressource. 187 * Peut etre un navire de peche professionnel ou non, un navire scientifique, un pêcheur à pied, 188 * un 189 * groupement de navires, etc. 190 * @return this.vessel Vessel 191 */ 192 public Vessel getVessel() 193 { 194 return this.vessel; 195 } 196 197 /** 198 * Navire, ou plus généralement un usager de la ressource. 199 * Peut etre un navire de peche professionnel ou non, un navire scientifique, un pêcheur à pied, 200 * un 201 * groupement de navires, etc. 202 * @param vesselIn Vessel 203 */ 204 public void setVessel(Vessel vesselIn) 205 { 206 this.vessel = vesselIn; 207 } 208 209 private QualitativeValue eventType; 210 211 /** 212 * Liste des valeurs qualitatives que peut prendre un paramètre. 213 * Par exemple : 214 * - pour le paramètre Sexe : "Mâle" et "Femelle" 215 * - pour le paramètre Présentation : "Vidé", "Entier", ... 216 * - pour le paramètre Catégorie : "Gros", "Moyen", ... 217 * @return this.eventType QualitativeValue 218 */ 219 public QualitativeValue getEventType() 220 { 221 return this.eventType; 222 } 223 224 /** 225 * Liste des valeurs qualitatives que peut prendre un paramètre. 226 * Par exemple : 227 * - pour le paramètre Sexe : "Mâle" et "Femelle" 228 * - pour le paramètre Présentation : "Vidé", "Entier", ... 229 * - pour le paramètre Catégorie : "Gros", "Moyen", ... 230 * @param eventTypeIn QualitativeValue 231 */ 232 public void setEventType(QualitativeValue eventTypeIn) 233 { 234 this.eventType = eventTypeIn; 235 } 236 237 /** 238 * Returns <code>true</code> if the argument is an VesselFleetEvent instance and all identifiers for this entity 239 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. 240 */ 241 @Override 242 public boolean equals(Object object) 243 { 244 if (this == object) 245 { 246 return true; 247 } 248 if (!(object instanceof VesselFleetEvent)) 249 { 250 return false; 251 } 252 final VesselFleetEvent that = (VesselFleetEvent)object; 253 if (this.vesselFleetEventPk == null || that.vesselFleetEventPk == null || !this.vesselFleetEventPk.equals(that.vesselFleetEventPk)) 254 { 255 return false; 256 } 257 return true; 258 } 259 260 /** 261 * Returns a hash code based on this entity's identifiers. 262 */ 263 @Override 264 public int hashCode() 265 { 266 int hashCode = 0; 267 hashCode = 29 * hashCode + (this.vesselFleetEventPk == null ? 0 : this.vesselFleetEventPk.hashCode()); 268 269 return hashCode; 270 } 271 272 /** 273 * Constructs new instances of {@link VesselFleetEvent}. 274 */ 275 public static final class Factory 276 { 277 /** 278 * Constructs a new instance of {@link VesselFleetEvent}. 279 * @return new VesselFleetEventImpl() 280 */ 281 public static VesselFleetEvent newInstance() 282 { 283 return new VesselFleetEventImpl(); 284 } 285 286 287 /** 288 * Constructs a new instance of {@link VesselFleetEvent}, taking all possible properties 289 * (except the identifier(s))as arguments. 290 * @param vessel Vessel 291 * @param eventType QualitativeValue 292 * @return newInstance VesselFleetEvent 293 */ 294 public static VesselFleetEvent newInstance(Vessel vessel, QualitativeValue eventType) 295 { 296 final VesselFleetEvent entity = new VesselFleetEventImpl(); 297 entity.setVessel(vessel); 298 entity.setEventType(eventType); 299 return entity; 300 } 301 } 302 303 /** 304 * @see Comparable#compareTo 305 */ 306 public int compareTo(VesselFleetEvent o) 307 { 308 int cmp = 0; 309 if (this.getVesselFleetEventPk() != null) 310 { 311 cmp = this.getVesselFleetEventPk().compareTo(o.getVesselFleetEventPk()); 312 } 313 314 return cmp; 315 } 316// HibernateEntity.vsl merge-point 317// VesselFleetEvent.java merge-point 318}