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