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.ValidityStatus; 032import java.io.Serializable; 033import java.sql.Timestamp; 034 035/** 036 * Entité transcodée 037 */ 038// HibernateEntity.vsl annotations merge-point 039public abstract class TranscribingItem 040 implements Serializable, Comparable<TranscribingItem> 041{ 042 /** 043 * The serial version UID of this class. Needed for serialization. 044 */ 045 private static final long serialVersionUID = -4243399515240870692L; 046 047 // Generate 6 attributes 048 private Integer id; 049 050 /** 051 * 052 * @return this.id Integer 053 */ 054 public Integer getId() 055 { 056 return this.id; 057 } 058 059 /** 060 * 061 * @param idIn Integer 062 */ 063 public void setId(Integer idIn) 064 { 065 this.id = idIn; 066 } 067 068 private Integer objectId; 069 070 /** 071 * Identifiant interne de l'objet (si la table correspondante a une colonne numérique ID). 072 * @return this.objectId Integer 073 */ 074 public Integer getObjectId() 075 { 076 return this.objectId; 077 } 078 079 /** 080 * Identifiant interne de l'objet (si la table correspondante a une colonne numérique ID). 081 * @param objectIdIn Integer 082 */ 083 public void setObjectId(Integer objectIdIn) 084 { 085 this.objectId = objectIdIn; 086 } 087 088 private String objectCode; 089 090 /** 091 * Code de l'objet (si la table correspondante a une colonne alphanumérique CODE). 092 * @return this.objectCode String 093 */ 094 public String getObjectCode() 095 { 096 return this.objectCode; 097 } 098 099 /** 100 * Code de l'objet (si la table correspondante a une colonne alphanumérique CODE). 101 * @param objectCodeIn String 102 */ 103 public void setObjectCode(String objectCodeIn) 104 { 105 this.objectCode = objectCodeIn; 106 } 107 108 private String externalCode; 109 110 /** 111 * 112 * @return this.externalCode String 113 */ 114 public String getExternalCode() 115 { 116 return this.externalCode; 117 } 118 119 /** 120 * 121 * @param externalCodeIn String 122 */ 123 public void setExternalCode(String externalCodeIn) 124 { 125 this.externalCode = externalCodeIn; 126 } 127 128 private String comments; 129 130 /** 131 * Commentaire décrivant le rang taxinomique 132 * @return this.comments String 133 */ 134 public String getComments() 135 { 136 return this.comments; 137 } 138 139 /** 140 * Commentaire décrivant le rang taxinomique 141 * @param commentsIn String 142 */ 143 public void setComments(String commentsIn) 144 { 145 this.comments = commentsIn; 146 } 147 148 private Timestamp updateDate; 149 150 /** 151 * 152 * @return this.updateDate Timestamp 153 */ 154 public Timestamp getUpdateDate() 155 { 156 return this.updateDate; 157 } 158 159 /** 160 * 161 * @param updateDateIn Timestamp 162 */ 163 public void setUpdateDate(Timestamp updateDateIn) 164 { 165 this.updateDate = updateDateIn; 166 } 167 168 // Generate 2 associations 169 private ValidityStatus validityStatus; 170 171 /** 172 * Etat de validation d'une donnée du référentiel. Utile pour les responsables de référentiel. 173 * Validity status of a referential data. 174 * @return this.validityStatus ValidityStatus 175 */ 176 public ValidityStatus getValidityStatus() 177 { 178 return this.validityStatus; 179 } 180 181 /** 182 * Etat de validation d'une donnée du référentiel. Utile pour les responsables de référentiel. 183 * Validity status of a referential data. 184 * @param validityStatusIn ValidityStatus 185 */ 186 public void setValidityStatus(ValidityStatus validityStatusIn) 187 { 188 this.validityStatus = validityStatusIn; 189 } 190 191 private TranscribingItemType transcribingItemType; 192 193 /** 194 * Système de transcodage utilisé 195 * @return this.transcribingItemType TranscribingItemType 196 */ 197 public TranscribingItemType getTranscribingItemType() 198 { 199 return this.transcribingItemType; 200 } 201 202 /** 203 * Système de transcodage utilisé 204 * @param transcribingItemTypeIn TranscribingItemType 205 */ 206 public void setTranscribingItemType(TranscribingItemType transcribingItemTypeIn) 207 { 208 this.transcribingItemType = transcribingItemTypeIn; 209 } 210 211 /** 212 * Returns <code>true</code> if the argument is an TranscribingItem instance and all identifiers for this entity 213 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. 214 */ 215 @Override 216 public boolean equals(Object object) 217 { 218 if (this == object) 219 { 220 return true; 221 } 222 if (!(object instanceof TranscribingItem)) 223 { 224 return false; 225 } 226 final TranscribingItem that = (TranscribingItem)object; 227 if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) 228 { 229 return false; 230 } 231 return true; 232 } 233 234 /** 235 * Returns a hash code based on this entity's identifiers. 236 */ 237 @Override 238 public int hashCode() 239 { 240 int hashCode = 0; 241 hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode()); 242 243 return hashCode; 244 } 245 246 /** 247 * Constructs new instances of {@link TranscribingItem}. 248 */ 249 public static final class Factory 250 { 251 /** 252 * Constructs a new instance of {@link TranscribingItem}. 253 * @return new TranscribingItemImpl() 254 */ 255 public static TranscribingItem newInstance() 256 { 257 return new TranscribingItemImpl(); 258 } 259 260 /** 261 * Constructs a new instance of {@link TranscribingItem}, taking all required and/or 262 * read-only properties as arguments, except for identifiers. 263 * @param externalCode String 264 * @param updateDate Timestamp 265 * @param validityStatus ValidityStatus 266 * @param transcribingItemType TranscribingItemType 267 * @return newInstance 268 */ 269 public static TranscribingItem newInstance(String externalCode, Timestamp updateDate, ValidityStatus validityStatus, TranscribingItemType transcribingItemType) 270 { 271 final TranscribingItem entity = new TranscribingItemImpl(); 272 entity.setExternalCode(externalCode); 273 entity.setUpdateDate(updateDate); 274 entity.setValidityStatus(validityStatus); 275 entity.setTranscribingItemType(transcribingItemType); 276 return entity; 277 } 278 279 /** 280 * Constructs a new instance of {@link TranscribingItem}, taking all possible properties 281 * (except the identifier(s))as arguments. 282 * @param objectId Integer 283 * @param objectCode String 284 * @param externalCode String 285 * @param comments String 286 * @param updateDate Timestamp 287 * @param validityStatus ValidityStatus 288 * @param transcribingItemType TranscribingItemType 289 * @return newInstance TranscribingItem 290 */ 291 public static TranscribingItem newInstance(Integer objectId, String objectCode, String externalCode, String comments, Timestamp updateDate, ValidityStatus validityStatus, TranscribingItemType transcribingItemType) 292 { 293 final TranscribingItem entity = new TranscribingItemImpl(); 294 entity.setObjectId(objectId); 295 entity.setObjectCode(objectCode); 296 entity.setExternalCode(externalCode); 297 entity.setComments(comments); 298 entity.setUpdateDate(updateDate); 299 entity.setValidityStatus(validityStatus); 300 entity.setTranscribingItemType(transcribingItemType); 301 return entity; 302 } 303 } 304 305 /** 306 * @see Comparable#compareTo 307 */ 308 public int compareTo(TranscribingItem 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.getObjectId() != null) 318 { 319 cmp = (cmp != 0 ? cmp : this.getObjectId().compareTo(o.getObjectId())); 320 } 321 if (this.getObjectCode() != null) 322 { 323 cmp = (cmp != 0 ? cmp : this.getObjectCode().compareTo(o.getObjectCode())); 324 } 325 if (this.getExternalCode() != null) 326 { 327 cmp = (cmp != 0 ? cmp : this.getExternalCode().compareTo(o.getExternalCode())); 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// TranscribingItem.java merge-point 342}