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
|
/**
* The persistent class for the voiture database table.
*
*/
@Entity
@NamedQuery(name="Voiture.findAll", query="SELECT v FROM Voiture v")
public class Voiture implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private int identifiant;
private int annee;
private int boite_vitesse;
private String nom;
private float prix;
//bi-directional many-to-many association to Reservation
@ManyToMany(mappedBy="voitures")
private List<Reservation> reservations;
//bi-directional many-to-one association to Agence
@ManyToOne
@JoinColumn(name="FK_agence")
private Agence agence;
//bi-directional many-to-one association to Categorie
@ManyToOne
@JoinColumn(name="FK_categorie")
private Categorie categorie;
//bi-directional many-to-one association to Carburant
@ManyToOne
@JoinColumn(name="FK_carburant")
private Carburant carburant;
//bi-directional many-to-many association to OptionVoiture
@ManyToMany
@JoinTable(
name="option_comprise_voiture"
, joinColumns={
@JoinColumn(name="FK_voiture")
}
, inverseJoinColumns={
@JoinColumn(name="FK_option_voiture")
}
)
private List<OptionVoiture> optionVoitures;
public Voiture() {
}
public int getIdentifiant() {
return this.identifiant;
}
public void setIdentifiant(int identifiant) {
this.identifiant = identifiant;
}
public int getAnnee() {
return this.annee;
}
public void setAnnee(int annee) {
this.annee = annee;
}
public int getBoite_vitesse() {
return this.boite_vitesse;
}
public void setBoite_vitesse(int boite_vitesse) {
this.boite_vitesse = boite_vitesse;
}
public String getNom() {
return this.nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public float getPrix() {
return this.prix;
}
public void setPrix(float prix) {
this.prix = prix;
}
public List<Reservation> getReservations() {
return this.reservations;
}
public void setReservations(List<Reservation> reservations) {
this.reservations = reservations;
}
public Agence getAgence() {
return this.agence;
}
public void setAgence(Agence agence) {
this.agence = agence;
}
public Categorie getCategorie() {
return this.categorie;
}
public void setCategorie(Categorie categorie) {
this.categorie = categorie;
}
public Carburant getCarburant() {
return this.carburant;
}
public void setCarburant(Carburant carburant) {
this.carburant = carburant;
}
public List<OptionVoiture> getOptionVoitures() {
return this.optionVoitures;
}
public void setOptionVoitures(List<OptionVoiture> optionVoitures) {
this.optionVoitures = optionVoitures;
}
} |
Partager