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
|
package com.gestion.model;
// Generated 2 janv. 2014 11:36:52 by Hibernate Tools 3.4.0.CR1
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
/**
* Depatement generated by hbm2java
*/
@Entity
@Table(name = "depatement", catalog = "bdcrud")
public class Depatement implements java.io.Serializable {
private Integer numero;
private String nom;
private Set<Employes> employeses = new HashSet<Employes>(0);
public Depatement() {
}
public Depatement(String nom ) {
this.nom = nom;
}
public Depatement(String nom, Set<Employes> employeses) {
this.nom = nom;
this.employeses = employeses;
}
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "Numero", unique = true, nullable = false)
public Integer getNumero() {
return this.numero;
}
public void setNumero(Integer numero) {
this.numero = numero;
}
@Column(name = "Nom", length = 10)
public String getNom() {
return this.nom;
}
public void setNom(String nom) {
this.nom = nom;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "depatement")
public Set<Employes> getEmployeses() {
return this.employeses;
}
public void setEmployeses(Set<Employes> employeses) {
this.employeses = employeses;
}
public String toString()
{
return this.numero + " " + this.nom ;
}
} |