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.playground; 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 * Capitaine (patron) de navire. 036 * A interpreter (une fois les données connues) et remodeliser. 037 * ref : flux SACAPT 038 */ 039// HibernateEntity.vsl annotations merge-point 040public abstract class PlaygroundVesselMaster 041 implements Serializable, Comparable<PlaygroundVesselMaster> 042{ 043 /** 044 * The serial version UID of this class. Needed for serialization. 045 */ 046 private static final long serialVersionUID = 5961005241126651825L; 047 048 // Generate 8 attributes 049 private Integer id; 050 051 /** 052 * 053 * @return this.id Integer 054 */ 055 public Integer getId() 056 { 057 return this.id; 058 } 059 060 /** 061 * 062 * @param idIn Integer 063 */ 064 public void setId(Integer idIn) 065 { 066 this.id = idIn; 067 } 068 069 private String registrationCode; 070 071 /** 072 * Code unique si donnée SACAPT (DPMA) 073 * @return this.registrationCode String 074 */ 075 public String getRegistrationCode() 076 { 077 return this.registrationCode; 078 } 079 080 /** 081 * Code unique si donnée SACAPT (DPMA) 082 * @param registrationCodeIn String 083 */ 084 public void setRegistrationCode(String registrationCodeIn) 085 { 086 this.registrationCode = registrationCodeIn; 087 } 088 089 private String lastname; 090 091 /** 092 * 093 * @return this.lastname String 094 */ 095 public String getLastname() 096 { 097 return this.lastname; 098 } 099 100 /** 101 * 102 * @param lastnameIn String 103 */ 104 public void setLastname(String lastnameIn) 105 { 106 this.lastname = lastnameIn; 107 } 108 109 private String firstname; 110 111 /** 112 * 113 * @return this.firstname String 114 */ 115 public String getFirstname() 116 { 117 return this.firstname; 118 } 119 120 /** 121 * 122 * @param firstnameIn String 123 */ 124 public void setFirstname(String firstnameIn) 125 { 126 this.firstname = firstnameIn; 127 } 128 129 private String street; 130 131 /** 132 * 133 * @return this.street String 134 */ 135 public String getStreet() 136 { 137 return this.street; 138 } 139 140 /** 141 * 142 * @param streetIn String 143 */ 144 public void setStreet(String streetIn) 145 { 146 this.street = streetIn; 147 } 148 149 private String zipCode; 150 151 /** 152 * 153 * @return this.zipCode String 154 */ 155 public String getZipCode() 156 { 157 return this.zipCode; 158 } 159 160 /** 161 * 162 * @param zipCodeIn String 163 */ 164 public void setZipCode(String zipCodeIn) 165 { 166 this.zipCode = zipCodeIn; 167 } 168 169 private String city; 170 171 /** 172 * 173 * @return this.city String 174 */ 175 public String getCity() 176 { 177 return this.city; 178 } 179 180 /** 181 * 182 * @param cityIn String 183 */ 184 public void setCity(String cityIn) 185 { 186 this.city = cityIn; 187 } 188 189 private Timestamp updateDate; 190 191 /** 192 * 193 * @return this.updateDate Timestamp 194 */ 195 public Timestamp getUpdateDate() 196 { 197 return this.updateDate; 198 } 199 200 /** 201 * 202 * @param updateDateIn Timestamp 203 */ 204 public void setUpdateDate(Timestamp updateDateIn) 205 { 206 this.updateDate = updateDateIn; 207 } 208 209 // Generate 1 associations 210 /** 211 * Returns <code>true</code> if the argument is an PlaygroundVesselMaster instance and all identifiers for this entity 212 * equal the identifiers of the argument entity. Returns <code>false</code> otherwise. 213 */ 214 @Override 215 public boolean equals(Object object) 216 { 217 if (this == object) 218 { 219 return true; 220 } 221 if (!(object instanceof PlaygroundVesselMaster)) 222 { 223 return false; 224 } 225 final PlaygroundVesselMaster that = (PlaygroundVesselMaster)object; 226 if (this.id == null || that.getId() == null || !this.id.equals(that.getId())) 227 { 228 return false; 229 } 230 return true; 231 } 232 233 /** 234 * Returns a hash code based on this entity's identifiers. 235 */ 236 @Override 237 public int hashCode() 238 { 239 int hashCode = 0; 240 hashCode = 29 * hashCode + (this.id == null ? 0 : this.id.hashCode()); 241 242 return hashCode; 243 } 244 245 /** 246 * Constructs new instances of {@link PlaygroundVesselMaster}. 247 */ 248 public static final class Factory 249 { 250 /** 251 * Constructs a new instance of {@link PlaygroundVesselMaster}. 252 * @return new PlaygroundVesselMasterImpl() 253 */ 254 public static PlaygroundVesselMaster newInstance() 255 { 256 return new PlaygroundVesselMasterImpl(); 257 } 258 259 /** 260 * Constructs a new instance of {@link PlaygroundVesselMaster}, taking all required and/or 261 * read-only properties as arguments, except for identifiers. 262 * @param registrationCode String 263 * @param updateDate Timestamp 264 * @return newInstance 265 */ 266 public static PlaygroundVesselMaster newInstance(String registrationCode, Timestamp updateDate) 267 { 268 final PlaygroundVesselMaster entity = new PlaygroundVesselMasterImpl(); 269 entity.setRegistrationCode(registrationCode); 270 entity.setUpdateDate(updateDate); 271 return entity; 272 } 273 274 /** 275 * Constructs a new instance of {@link PlaygroundVesselMaster}, taking all possible properties 276 * (except the identifier(s))as arguments. 277 * @param registrationCode String 278 * @param lastname String 279 * @param firstname String 280 * @param street String 281 * @param zipCode String 282 * @param city String 283 * @param updateDate Timestamp 284 * @return newInstance PlaygroundVesselMaster 285 */ 286 public static PlaygroundVesselMaster newInstance(String registrationCode, String lastname, String firstname, String street, String zipCode, String city, Timestamp updateDate) 287 { 288 final PlaygroundVesselMaster entity = new PlaygroundVesselMasterImpl(); 289 entity.setRegistrationCode(registrationCode); 290 entity.setLastname(lastname); 291 entity.setFirstname(firstname); 292 entity.setStreet(street); 293 entity.setZipCode(zipCode); 294 entity.setCity(city); 295 entity.setUpdateDate(updateDate); 296 return entity; 297 } 298 } 299 300 /** 301 * @see Comparable#compareTo 302 */ 303 public int compareTo(PlaygroundVesselMaster o) 304 { 305 int cmp = 0; 306 if (this.getId() != null) 307 { 308 cmp = this.getId().compareTo(o.getId()); 309 } 310 else 311 { 312 if (this.getRegistrationCode() != null) 313 { 314 cmp = (cmp != 0 ? cmp : this.getRegistrationCode().compareTo(o.getRegistrationCode())); 315 } 316 if (this.getLastname() != null) 317 { 318 cmp = (cmp != 0 ? cmp : this.getLastname().compareTo(o.getLastname())); 319 } 320 if (this.getFirstname() != null) 321 { 322 cmp = (cmp != 0 ? cmp : this.getFirstname().compareTo(o.getFirstname())); 323 } 324 if (this.getStreet() != null) 325 { 326 cmp = (cmp != 0 ? cmp : this.getStreet().compareTo(o.getStreet())); 327 } 328 if (this.getZipCode() != null) 329 { 330 cmp = (cmp != 0 ? cmp : this.getZipCode().compareTo(o.getZipCode())); 331 } 332 if (this.getCity() != null) 333 { 334 cmp = (cmp != 0 ? cmp : this.getCity().compareTo(o.getCity())); 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// PlaygroundVesselMaster.java merge-point 345}