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.referential; 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 java.io.Serializable; 032import java.sql.Timestamp; 033 034/** 035 * Type de zone de proximité particulière. 036 * Par exemple : 037 * - DCP (Dispositif de Concentration de Poison) 038 * - Filière aquacole 039 * - ... 040 * (liste non exhaustive) 041 * Nombre de lignes : 10 042 */ 043// HibernateEntity.vsl annotations merge-point 044public abstract class NearbySpecificArea 045 implements Serializable, Comparable<NearbySpecificArea> 046{ 047 /** 048 * The serial version UID of this class. Needed for serialization. 049 */ 050 private static final long serialVersionUID = -3458092894367569520L; 051 052 // Generate 6 attributes 053 private String comments; 054 055 /** 056 * 057 * @return this.comments String 058 */ 059 public String getComments() 060 { 061 return this.comments; 062 } 063 064 /** 065 * 066 * @param commentsIn String 067 */ 068 public void setComments(String commentsIn) 069 { 070 this.comments = commentsIn; 071 } 072 073 private Integer id; 074 075 /** 076 * Idenfiant interne. Généré par le système. 077 * @return this.id Integer 078 */ 079 public Integer getId() 080 { 081 return this.id; 082 } 083 084 /** 085 * Idenfiant interne. Généré par le système. 086 * @param idIn Integer 087 */ 088 public void setId(Integer idIn) 089 { 090 this.id = idIn; 091 } 092 093 private String label; 094 095 /** 096 * 097 * @return this.label String 098 */ 099 public String getLabel() 100 { 101 return this.label; 102 } 103 104 /** 105 * 106 * @param labelIn String 107 */ 108 public void setLabel(String labelIn) 109 { 110 this.label = labelIn; 111 } 112 113 private String name; 114 115 /** 116 * 117 * @return this.name String 118 */ 119 public String getName() 120 { 121 return this.name; 122 } 123 124 /** 125 * 126 * @param nameIn String 127 */ 128 public void setName(String nameIn) 129 { 130 this.name = nameIn; 131 } 132 133 private String description; 134 135 /** 136 * 137 * @return this.description String 138 */ 139 public String getDescription() 140 { 141 return this.description; 142 } 143 144 /** 145 * 146 * @param descriptionIn String 147 */ 148 public void setDescription(String descriptionIn) 149 { 150 this.description = descriptionIn; 151 } 152 153 private Timestamp updateDate; 154 155 /** 156 * 157 * @return this.updateDate Timestamp 158 */ 159 public Timestamp getUpdateDate() 160 { 161 return this.updateDate; 162 } 163 164 /** 165 * 166 * @param updateDateIn Timestamp 167 */ 168 public void setUpdateDate(Timestamp updateDateIn) 169 { 170 this.updateDate = updateDateIn; 171 } 172 173 // Generate 3 associations 174 private Status status; 175 176 /** 177 * Pour les données du référentiel, information permettant de déterminer si une donnée est 178 * valide, 179 * obsolète ou temporaire. 180 * - obsolète (=inactif) : '0' 181 * - valide (=actif) : '1' 182 * - temporaire : '2' 183 * - en cours de suppression : '3' 184 * - : '4' 185 * note : on a préfère ici 'valide' au terme 'actif' (utilisé dans Harmonie), pour ne pas 186 * confondre 187 * avec par exemple l'activité d'un navire sur un mois. 188 * @return this.status Status 189 */ 190 public Status getStatus() 191 { 192 return this.status; 193 } 194 195 /** 196 * Pour les données du référentiel, information permettant de déterminer si une donnée est 197 * valide, 198 * obsolète ou temporaire. 199 * - obsolète (=inactif) : '0' 200 * - valide (=actif) : '1' 201 * - temporaire : '2' 202 * - en cours de suppression : '3' 203 * - : '4' 204 * note : on a préfère ici 'valide' au terme 'actif' (utilisé dans Harmonie), pour ne pas 205 * confondre 206 * avec par exemple l'activité d'un navire sur un mois. 207 * @param statusIn Status 208 */ 209 public void setStatus(Status statusIn) 210 { 211 this.status = statusIn; 212 } 213 214 /** 215 * Returns <code>true</code> if the argument is an NearbySpecificArea instance and all identifiers for this entity 216 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. 217 */ 218 @Override 219 public boolean equals(Object object) 220 { 221 if (this == object) 222 { 223 return true; 224 } 225 if (!(object instanceof NearbySpecificArea)) 226 { 227 return false; 228 } 229 final NearbySpecificArea that = (NearbySpecificArea)object; 230 if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) 231 { 232 return false; 233 } 234 return true; 235 } 236 237 /** 238 * Returns a hash code based on this entity's identifiers. 239 */ 240 @Override 241 public int hashCode() 242 { 243 int hashCode = 0; 244 hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode()); 245 246 return hashCode; 247 } 248 249 /** 250 * Constructs new instances of {@link NearbySpecificArea}. 251 */ 252 public static final class Factory 253 { 254 /** 255 * Constructs a new instance of {@link NearbySpecificArea}. 256 * @return new NearbySpecificAreaImpl() 257 */ 258 public static NearbySpecificArea newInstance() 259 { 260 return new NearbySpecificAreaImpl(); 261 } 262 263 /** 264 * Constructs a new instance of {@link NearbySpecificArea}, taking all required and/or 265 * read-only properties as arguments, except for identifiers. 266 * @param label String 267 * @param name String 268 * @param description String 269 * @param updateDate Timestamp 270 * @param status Status 271 * @return newInstance 272 */ 273 public static NearbySpecificArea newInstance(String label, String name, String description, Timestamp updateDate, Status status) 274 { 275 final NearbySpecificArea entity = new NearbySpecificAreaImpl(); 276 entity.setLabel(label); 277 entity.setName(name); 278 entity.setDescription(description); 279 entity.setUpdateDate(updateDate); 280 entity.setStatus(status); 281 return entity; 282 } 283 284 /** 285 * Constructs a new instance of {@link NearbySpecificArea}, taking all possible properties 286 * (except the identifier(s))as arguments. 287 * @param comments String 288 * @param label String 289 * @param name String 290 * @param description String 291 * @param updateDate Timestamp 292 * @param status Status 293 * @return newInstance NearbySpecificArea 294 */ 295 public static NearbySpecificArea newInstance(String comments, String label, String name, String description, Timestamp updateDate, Status status) 296 { 297 final NearbySpecificArea entity = new NearbySpecificAreaImpl(); 298 entity.setComments(comments); 299 entity.setLabel(label); 300 entity.setName(name); 301 entity.setDescription(description); 302 entity.setUpdateDate(updateDate); 303 entity.setStatus(status); 304 return entity; 305 } 306 } 307 308 /** 309 * @see Comparable#compareTo 310 */ 311 public int compareTo(NearbySpecificArea o) 312 { 313 int cmp = 0; 314 if (this.getId() != null) 315 { 316 cmp = this.getId().compareTo(o.getId()); 317 } 318 else 319 { 320 if (this.getComments() != null) 321 { 322 cmp = (cmp != 0 ? cmp : this.getComments().compareTo(o.getComments())); 323 } 324 if (this.getLabel() != null) 325 { 326 cmp = (cmp != 0 ? cmp : this.getLabel().compareTo(o.getLabel())); 327 } 328 if (this.getName() != null) 329 { 330 cmp = (cmp != 0 ? cmp : this.getName().compareTo(o.getName())); 331 } 332 if (this.getDescription() != null) 333 { 334 cmp = (cmp != 0 ? cmp : this.getDescription().compareTo(o.getDescription())); 335 } 336 if (this.getUpdateDate() != null) 337 { 338 cmp = (cmp != 0 ? cmp : this.getUpdateDate().compareTo(o.getUpdateDate())); 339 } 340 } 341 return cmp; 342 } 343// HibernateEntity.vsl merge-point 344// NearbySpecificArea.java merge-point 345}