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