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.fishingArea; 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.location.Location; 032import java.io.Serializable; 033 034/** 035 * 036 */ 037// HibernateEntity.vsl annotations merge-point 038public abstract class FishingArea2ManagedLocation 039 implements Serializable, Comparable<FishingArea2ManagedLocation> 040{ 041 /** 042 * The serial version UID of this class. Needed for serialization. 043 */ 044 private static final long serialVersionUID = 6260749406711446424L; 045 046 private FishingArea2ManagedLocationPK fishingArea2ManagedLocationPk; 047 048 /** 049 * Get the composite primary key identifier class 050 * @return fishingArea2ManagedLocationPk 051 */ 052 public FishingArea2ManagedLocationPK getFishingArea2ManagedLocationPk() 053 { 054 return this.fishingArea2ManagedLocationPk; 055 } 056 057 /** 058 * Set the composite primary key identifier class 059 * @param fishingArea2ManagedLocationPkIn 060 */ 061 public void setFishingArea2ManagedLocationPk(FishingArea2ManagedLocationPK fishingArea2ManagedLocationPkIn) { 062 this.fishingArea2ManagedLocationPk = fishingArea2ManagedLocationPkIn; 063 } 064 065 // Generate 0 attributes 066 // Generate 2 associations 067 private Location location; 068 069 /** 070 * Représente un lieu au sens général du terme. Il peut s'agir d'un lieu ponctuel, linéaire ou 071 * surfacique. 072 * Suivant sa classification et son niveau, il peut s'agir d'un secteur FAO, un port de pêche, 073 * un 074 * quartier maritime, une criée, etc. 075 * Nombre de lignes : lieux terrestre : 4500 + secteurs : 11210 + strates : 1000 + localités : 076 * 200 077 * @return this.location Location 078 */ 079 public Location getLocation() 080 { 081 return this.location; 082 } 083 084 /** 085 * Représente un lieu au sens général du terme. Il peut s'agir d'un lieu ponctuel, linéaire ou 086 * surfacique. 087 * Suivant sa classification et son niveau, il peut s'agir d'un secteur FAO, un port de pêche, 088 * un 089 * quartier maritime, une criée, etc. 090 * Nombre de lignes : lieux terrestre : 4500 + secteurs : 11210 + strates : 1000 + localités : 091 * 200 092 * @param locationIn Location 093 */ 094 public void setLocation(Location locationIn) 095 { 096 this.location = locationIn; 097 } 098 099 private FishingArea fishingArea; 100 101 /** 102 * <html> 103 * <head> 104 * <style> 105 * p {padding:0px; margin:0px;} 106 * </style> 107 * </head> 108 * <body> 109 * <p> 110 * Zone de peche ou d'activité effective d'un navire. 111 * </p> 112 * <p> 113 * </p> 114 * <p> 115 * Contient une entrée pour chaque zone de peche d'un navire. 116 * </p> 117 * <p> 118 * </p> 119 * <p> 120 * ATTENTION : ne pas réutiliser une zone de peche effective dèjà 121 * existante, à cause des liens de composition (et des contraintes "delete 122 * cascade") depuis les autres tables. 123 * </p> 124 * <p> 125 * Votre enregistrement pourrait etre supprimée par quelqu'un d'autre ! 126 * </p> 127 * <p> 128 * </p> 129 * <p> 130 * </p> 131 * <p> 132 * <u>Cas particulier des campagnes scientifiques (F.Coppin) : </u>Dans le 133 * cas des campagnes scientifiques, ce concept correspond à une "station". La 134 * notion exacte de Fishing Area est définie suivant le protocole spatiale 135 * mise en place. En effet, la notion la plus fine d'aire de travail est la 136 * localité (stockée <i>FishingArea2RegulationLocation</i>). 137 * L'ordre de réalisation des prélèvements pouvant changer d'une année sur 138 * l'autre, la localité permet de disposer d'un code unique pour une zone 139 * de prélèvement donnée. Cette localité peut s'inscrire ou non selon le 140 * protocole dans une strate (stcokée dans <i>FishingArea2RegulationLocation)</i> 141 * définie dans le cadre du programme lié à la série (ce paramétrage est 142 * stocké dans les <i>Program</i> et <i>Strategy</i>). Il s'agit alors 143 * d'un 2ème niveau géographique pouvant contenir une ou plusieurs 144 * localités. 145 * </p> 146 * <p> 147 * Toutes les situations peuvent être envisagées : 148 * </p> 149 * <ul> 150 * <li> 151 * Localités + strates 152 * </li> 153 * <li> 154 * Localités sans strate 155 * </li> 156 * <li> 157 * Strates sans localité 158 * </li> 159 * <li> 160 * ni localité ni strate 161 * </li> 162 * </ul> 163 * <p> 164 * En plus de ces options la notion de strate bathymétrique peut exister. 165 * </p> 166 * <p> 167 * Dans tous les cas de figure ces divers éléments géographiques doivent 168 * s'inscrivent dans la notion officielle de rectangle ou sous rectangle 169 * statistique (stcoké dans <i>FishingArea.location</i>). 170 * </p> 171 * <p> 172 * </p> 173 * </body> 174 * </html> 175 * @return this.fishingArea FishingArea 176 */ 177 public FishingArea getFishingArea() 178 { 179 return this.fishingArea; 180 } 181 182 /** 183 * <html> 184 * <head> 185 * <style> 186 * p {padding:0px; margin:0px;} 187 * </style> 188 * </head> 189 * <body> 190 * <p> 191 * Zone de peche ou d'activité effective d'un navire. 192 * </p> 193 * <p> 194 * </p> 195 * <p> 196 * Contient une entrée pour chaque zone de peche d'un navire. 197 * </p> 198 * <p> 199 * </p> 200 * <p> 201 * ATTENTION : ne pas réutiliser une zone de peche effective dèjà 202 * existante, à cause des liens de composition (et des contraintes "delete 203 * cascade") depuis les autres tables. 204 * </p> 205 * <p> 206 * Votre enregistrement pourrait etre supprimée par quelqu'un d'autre ! 207 * </p> 208 * <p> 209 * </p> 210 * <p> 211 * </p> 212 * <p> 213 * <u>Cas particulier des campagnes scientifiques (F.Coppin) : </u>Dans le 214 * cas des campagnes scientifiques, ce concept correspond à une "station". La 215 * notion exacte de Fishing Area est définie suivant le protocole spatiale 216 * mise en place. En effet, la notion la plus fine d'aire de travail est la 217 * localité (stockée <i>FishingArea2RegulationLocation</i>). 218 * L'ordre de réalisation des prélèvements pouvant changer d'une année sur 219 * l'autre, la localité permet de disposer d'un code unique pour une zone 220 * de prélèvement donnée. Cette localité peut s'inscrire ou non selon le 221 * protocole dans une strate (stcokée dans <i>FishingArea2RegulationLocation)</i> 222 * définie dans le cadre du programme lié à la série (ce paramétrage est 223 * stocké dans les <i>Program</i> et <i>Strategy</i>). Il s'agit alors 224 * d'un 2ème niveau géographique pouvant contenir une ou plusieurs 225 * localités. 226 * </p> 227 * <p> 228 * Toutes les situations peuvent être envisagées : 229 * </p> 230 * <ul> 231 * <li> 232 * Localités + strates 233 * </li> 234 * <li> 235 * Localités sans strate 236 * </li> 237 * <li> 238 * Strates sans localité 239 * </li> 240 * <li> 241 * ni localité ni strate 242 * </li> 243 * </ul> 244 * <p> 245 * En plus de ces options la notion de strate bathymétrique peut exister. 246 * </p> 247 * <p> 248 * Dans tous les cas de figure ces divers éléments géographiques doivent 249 * s'inscrivent dans la notion officielle de rectangle ou sous rectangle 250 * statistique (stcoké dans <i>FishingArea.location</i>). 251 * </p> 252 * <p> 253 * </p> 254 * </body> 255 * </html> 256 * @param fishingAreaIn FishingArea 257 */ 258 public void setFishingArea(FishingArea fishingAreaIn) 259 { 260 this.fishingArea = fishingAreaIn; 261 } 262 263 /** 264 * This entity does not have any identifiers 265 * and is not extending any other entity, 266 * so this method will only return <code>true</code> if the argument reference and <code>this</code> 267 * refer to the same object. 268 */ 269 @Override 270 public boolean equals(Object object) 271 { 272 return super.equals(object); 273 } 274 275 /** 276 * This entity does not have any identifiers 277 * and is not extending any other entity, 278 * so this method will only take the identifiers of this entity into account when calculating the hash code. 279 */ 280 @Override 281 public int hashCode() 282 { 283 return super.hashCode(); 284 } 285 286 /** 287 * Constructs new instances of {@link FishingArea2ManagedLocation}. 288 */ 289 public static final class Factory 290 { 291 /** 292 * Constructs a new instance of {@link FishingArea2ManagedLocation}. 293 * @return new FishingArea2ManagedLocationImpl() 294 */ 295 public static FishingArea2ManagedLocation newInstance() 296 { 297 return new FishingArea2ManagedLocationImpl(); 298 } 299 300 301 /** 302 * Constructs a new instance of {@link FishingArea2ManagedLocation}, taking all possible properties 303 * (except the identifier(s))as arguments. 304 * @param location Location 305 * @param fishingArea FishingArea 306 * @return newInstance FishingArea2ManagedLocation 307 */ 308 public static FishingArea2ManagedLocation newInstance(Location location, FishingArea fishingArea) 309 { 310 final FishingArea2ManagedLocation entity = new FishingArea2ManagedLocationImpl(); 311 entity.setLocation(location); 312 entity.setFishingArea(fishingArea); 313 return entity; 314 } 315 } 316 317 /** 318 * @see Comparable#compareTo 319 */ 320 public int compareTo(FishingArea2ManagedLocation o) 321 { 322 int cmp = 0; 323 if (this.getFishingArea2ManagedLocationPk() != null) 324 { 325 cmp = this.getFishingArea2ManagedLocationPk().compareTo(o.getFishingArea2ManagedLocationPk()); 326 } 327 return cmp; 328 } 329// HibernateEntity.vsl merge-point 330// FishingArea2ManagedLocation.java merge-point 331}