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
|
@Entity
@Table(name="agence"
,catalog="derichebourg"
)
public class Agence implements java.io.Serializable {
private Integer numAgence;
private String nomAgence;
private String adresse;
private Set<Site> sites = new HashSet<Site>(0);
private Set<Contratlocationvehicules> contratlocationvehiculeses = new HashSet<Contratlocationvehicules>(0);
private Set<Personnel> personnels = new HashSet<Personnel>(0);
public Agence() {
}
public Agence(String nomAgence) {
this.nomAgence = nomAgence;
}
public Agence(String nomAgence, String adresse, Set<Site> sites, Set<Contratlocationvehicules> contratlocationvehiculeses, Set<Personnel> personnels) {
this.nomAgence = nomAgence;
this.adresse = adresse;
this.sites = sites;
this.contratlocationvehiculeses = contratlocationvehiculeses;
this.personnels = personnels;
}
public Agence(Integer numAgence, String nomAgence) {
this.numAgence = numAgence;
this.nomAgence = nomAgence;
}
@Id @GeneratedValue(strategy=IDENTITY)
@Column(name="numAgence", unique=true, nullable=false)
public Integer getNumAgence() {
return this.numAgence;
}
public void setNumAgence(Integer numAgence) {
this.numAgence = numAgence;
}
@Column(name="nomAgence", nullable=false, length=700)
public String getNomAgence() {
return this.nomAgence;
}
public void setNomAgence(String nomAgence) {
this.nomAgence = nomAgence;
}
@Column(name="adresse", length=800)
public String getAdresse() {
return this.adresse;
}
public void setAdresse(String adresse) {
this.adresse = adresse;
}
@ManyToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="agences")
public Set<Site> getSites() {
return this.sites;
}
public void setSites(Set<Site> sites) {
this.sites = sites;
}
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="agence")
public Set<Contratlocationvehicules> getContratlocationvehiculeses() {
return this.contratlocationvehiculeses;
}
public void setContratlocationvehiculeses(Set<Contratlocationvehicules> contratlocationvehiculeses) {
this.contratlocationvehiculeses = contratlocationvehiculeses;
}
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="agence")
public Set<Personnel> getPersonnels() {
return this.personnels;
}
public void setPersonnels(Set<Personnel> personnels) {
this.personnels = personnels;
} |
Partager