1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
| package ca.qc.op.bo;
// Generated Nov 28, 2007 10:11:48 AM by Hibernate Tools 3.2.0.beta8
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;
import javax.persistence.Version;
import org.hibernate.annotations.*;
/**
* AbstractMedecin generated by hbm2java
*/
@SuppressWarnings("hiding")
@MappedSuperclass
public abstract class AbstractMedecin implements java.io.Serializable {
// Fields
// Property hashValue
private int hashValue = 0;
protected Long oi;
protected TypeRue typeRue;
protected Region region;
protected Specialite specialite;
protected String nom;
protected String prenom;
protected String noPermis;
protected boolean noPermisTemporaire;
protected char omniSpec;
protected Short anneeGraduation;
protected String remarquesGraduation;
protected String noRamq;
protected String remarques;
protected String noImmeuble;
protected String nomRue;
protected String ville;
protected String province;
protected String codePostal;
protected String telephone;
protected Set<AvisConformite> avisConformiteSet;
protected Set<AdhesionAmp> adhesionAmpSet;
protected Set<Occupation> occupationSet;
@Version
@Column(name="VERSION", nullable = false)
protected Integer version;
// Constructors
/** default constructor */
public AbstractMedecin() {}
// Property accessors
@Id
@GenericGenerator(name = "generator", strategy = "increment")
@GeneratedValue(generator = "generator")
@Column(name = "OI", unique = false, nullable = false, insertable = true, updatable = true, precision = 18, scale = 0)
public Long getOi() {
return this.oi;
}
public void setOi(Long pOi) {
this.oi = pOi;
this.hashValue = 0;
}
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "OI_REGION", unique = false, nullable = true, insertable = true, updatable = true)
public Region getRegion() {
return this.region;
}
public void setRegion(Region region) {
this.region = region;
}
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "OI_SPECIALITE", unique = false, nullable = true, insertable = true, updatable = true)
public Specialite getSpecialite() {
return this.specialite;
}
public void setSpecialite(Specialite specialite) {
this.specialite = specialite;
}
@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
@JoinColumn(name = "OI_TYPE_RUE", unique = false, nullable = true, insertable = true, updatable = true)
public TypeRue getTypeRue() {
return this.typeRue;
}
public void setTypeRue(TypeRue typeRue) {
this.typeRue = typeRue;
}
@Column(name = "NOM", unique = false, nullable = false, insertable = true, updatable = true, length = 50)
public String getNom() {
return this.nom;
}
public void setNom(String pNom) {
this.nom = pNom;
}
@Column(name = "PRENOM", unique = false, nullable = false, insertable = true, updatable = true, length = 50)
public String getPrenom() {
return this.prenom;
}
public void setPrenom(String prenom) {
this.prenom = prenom;
}
@Column(name = "NO_PERMIS", unique = false, nullable = false, insertable = true, updatable = true, length = 20)
public String getNoPermis() {
return this.noPermis;
}
public void setNoPermis(String noPermis) {
this.noPermis = noPermis;
}
@Column(name = "NO_PERMIS_TEMPORAIRE", unique = false, nullable = false, insertable = true, updatable = true, precision = 1, scale = 0)
public boolean getNoPermisTemporaire() {
return this.noPermisTemporaire;
}
public void setNoPermisTemporaire(boolean noPermisTemporaire) {
this.noPermisTemporaire = noPermisTemporaire;
}
@Column(name = "OMNI_SPEC", unique = false, nullable = false, insertable = true, updatable = true, length = 1)
public char getOmniSpec() {
return this.omniSpec;
}
public void setOmniSpec(char omniSpec) {
this.omniSpec = omniSpec;
}
@Column(name = "ANNEE_GRADUATION", unique = false, nullable = true, insertable = true, updatable = true, precision = 4, scale = 0)
public Short getAnneeGraduation() {
return this.anneeGraduation;
}
public void setAnneeGraduation(Short anneeGraduation) {
this.anneeGraduation = anneeGraduation;
}
@Column(name = "REMARQUES_GRADUATION", unique = false, nullable = true, insertable = true, updatable = true, length = 4000)
public String getRemarquesGraduation() {
return this.remarquesGraduation;
}
public void setRemarquesGraduation(String remarquesGraduation) {
this.remarquesGraduation = remarquesGraduation;
}
@Column(name = "NO_RAMQ", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
public String getNoRamq() {
return this.noRamq;
}
public void setNoRamq(String noRamq) {
this.noRamq = noRamq;
}
@Column(name = "REMARQUES", unique = false, nullable = true, insertable = true, updatable = true, length = 4000)
public String getRemarques() {
return this.remarques;
}
public void setRemarques(String remarques) {
this.remarques = remarques;
}
@Column(name = "NO_IMMEUBLE", unique = false, nullable = true, insertable = true, updatable = true, length = 10)
public String getNoImmeuble() {
return this.noImmeuble;
}
public void setNoImmeuble(String noImmeuble) {
this.noImmeuble = noImmeuble;
}
@Column(name = "NOM_RUE", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
public String getNomRue() {
return this.nomRue;
}
public void setNomRue(String nomRue) {
this.nomRue = nomRue;
}
@Column(name = "VILLE", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
public String getVille() {
return this.ville;
}
public void setVille(String ville) {
this.ville = ville;
}
@Column(name = "PROVINCE", unique = false, nullable = true, insertable = true, updatable = true, length = 50)
public String getProvince() {
return this.province;
}
public void setProvince(String province) {
this.province = province;
}
@Column(name = "CODE_POSTAL", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
public String getCodePostal() {
return this.codePostal;
}
public void setCodePostal(String codePostal) {
this.codePostal = codePostal;
}
@Column(name = "TELEPHONE", unique = false, nullable = true, insertable = true, updatable = true, length = 14)
public String getTelephone() {
return this.telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public void setAvisConformiteSet(Set<AvisConformite> avisConformiteSet) {
this.avisConformiteSet = avisConformiteSet;
}
public void setAdhesionAmpSet(Set<AdhesionAmp> adhesionAmpSet) {
this.adhesionAmpSet = adhesionAmpSet;
}
public void setOccupationSet(Set<Occupation> occupationSet) {
this.occupationSet = occupationSet;
}
/**
* toString
*
* @return String
*/
@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append(this.getClass().getName()).append("@").append(Integer.toHexString(this.hashCode())).append(" [");//$NON-NLS-1$//$NON-NLS-2$
buffer.append("]");//$NON-NLS-1$
return buffer.toString();
}
@Override
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof AbstractMedecin))
return false;
AbstractMedecin castOther = (AbstractMedecin)other;
return castOther.getOi().equals(this.getOi());
}
/**
* Implementation of the hashCode method conforming to the Bloch pattern
* with the exception of array properties (these are very unlikely primary
* key types).
*
* @return int hashCode
*/
@Override
public int hashCode() {
if (this.hashValue == 0) {
int result = 17;
int oiValue = this.oi == null ? 0 : this.oi.hashCode();
result = result * 37 + oiValue;
this.hashValue = result;
}
return this.hashValue;
}
} |
Partager