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 java.io.Serializable; 032import java.sql.Timestamp; 033 034/** 035 * Sens du transcodage : 036 */ 037// HibernateEntity.vsl annotations merge-point 038public abstract class TranscribingSide 039 implements Serializable, Comparable<TranscribingSide> 040{ 041 /** 042 * The serial version UID of this class. Needed for serialization. 043 */ 044 private static final long serialVersionUID = -5737507901094543497L; 045 046 // Generate 5 attributes 047 private Integer id; 048 049 /** 050 * 051 * @return this.id Integer 052 */ 053 public Integer getId() 054 { 055 return this.id; 056 } 057 058 /** 059 * 060 * @param idIn Integer 061 */ 062 public void setId(Integer idIn) 063 { 064 this.id = idIn; 065 } 066 067 private String name; 068 069 /** 070 * 071 * @return this.name String 072 */ 073 public String getName() 074 { 075 return this.name; 076 } 077 078 /** 079 * 080 * @param nameIn String 081 */ 082 public void setName(String nameIn) 083 { 084 this.name = nameIn; 085 } 086 087 private String description; 088 089 /** 090 * 091 * @return this.description String 092 */ 093 public String getDescription() 094 { 095 return this.description; 096 } 097 098 /** 099 * 100 * @param descriptionIn String 101 */ 102 public void setDescription(String descriptionIn) 103 { 104 this.description = descriptionIn; 105 } 106 107 private String comments; 108 109 /** 110 * Commentaire décrivant le rang taxinomique 111 * @return this.comments String 112 */ 113 public String getComments() 114 { 115 return this.comments; 116 } 117 118 /** 119 * Commentaire décrivant le rang taxinomique 120 * @param commentsIn String 121 */ 122 public void setComments(String commentsIn) 123 { 124 this.comments = commentsIn; 125 } 126 127 private Timestamp updateDate; 128 129 /** 130 * 131 * @return this.updateDate Timestamp 132 */ 133 public Timestamp getUpdateDate() 134 { 135 return this.updateDate; 136 } 137 138 /** 139 * 140 * @param updateDateIn Timestamp 141 */ 142 public void setUpdateDate(Timestamp updateDateIn) 143 { 144 this.updateDate = updateDateIn; 145 } 146 147 // Generate 1 associations 148 /** 149 * Returns <code>true</code> if the argument is an TranscribingSide instance and all identifiers for this entity 150 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. 151 */ 152 @Override 153 public boolean equals(Object object) 154 { 155 if (this == object) 156 { 157 return true; 158 } 159 if (!(object instanceof TranscribingSide)) 160 { 161 return false; 162 } 163 final TranscribingSide that = (TranscribingSide)object; 164 if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) 165 { 166 return false; 167 } 168 return true; 169 } 170 171 /** 172 * Returns a hash code based on this entity's identifiers. 173 */ 174 @Override 175 public int hashCode() 176 { 177 int hashCode = 0; 178 hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode()); 179 180 return hashCode; 181 } 182 183 /** 184 * Constructs new instances of {@link TranscribingSide}. 185 */ 186 public static final class Factory 187 { 188 /** 189 * Constructs a new instance of {@link TranscribingSide}. 190 * @return new TranscribingSideImpl() 191 */ 192 public static TranscribingSide newInstance() 193 { 194 return new TranscribingSideImpl(); 195 } 196 197 /** 198 * Constructs a new instance of {@link TranscribingSide}, taking all required and/or 199 * read-only properties as arguments, except for identifiers. 200 * @param name String 201 * @param updateDate Timestamp 202 * @return newInstance 203 */ 204 public static TranscribingSide newInstance(String name, Timestamp updateDate) 205 { 206 final TranscribingSide entity = new TranscribingSideImpl(); 207 entity.setName(name); 208 entity.setUpdateDate(updateDate); 209 return entity; 210 } 211 212 /** 213 * Constructs a new instance of {@link TranscribingSide}, taking all possible properties 214 * (except the identifier(s))as arguments. 215 * @param name String 216 * @param description String 217 * @param comments String 218 * @param updateDate Timestamp 219 * @return newInstance TranscribingSide 220 */ 221 public static TranscribingSide newInstance(String name, String description, String comments, Timestamp updateDate) 222 { 223 final TranscribingSide entity = new TranscribingSideImpl(); 224 entity.setName(name); 225 entity.setDescription(description); 226 entity.setComments(comments); 227 entity.setUpdateDate(updateDate); 228 return entity; 229 } 230 } 231 232 /** 233 * @see Comparable#compareTo 234 */ 235 public int compareTo(TranscribingSide o) 236 { 237 int cmp = 0; 238 if (this.getId() != null) 239 { 240 cmp = this.getId().compareTo(o.getId()); 241 } 242 else 243 { 244 if (this.getName() != null) 245 { 246 cmp = (cmp != 0 ? cmp : this.getName().compareTo(o.getName())); 247 } 248 if (this.getDescription() != null) 249 { 250 cmp = (cmp != 0 ? cmp : this.getDescription().compareTo(o.getDescription())); 251 } 252 if (this.getComments() != null) 253 { 254 cmp = (cmp != 0 ? cmp : this.getComments().compareTo(o.getComments())); 255 } 256 if (this.getUpdateDate() != null) 257 { 258 cmp = (cmp != 0 ? cmp : this.getUpdateDate().compareTo(o.getUpdateDate())); 259 } 260 } 261 return cmp; 262 } 263// HibernateEntity.vsl merge-point 264// TranscribingSide.java merge-point 265}