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
|
package bean.entity;
import interfaces.entity.InterfaceTaches;
import java.io.Serializable;
import java.sql.Date;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
@Entity(name="Taches")
@Table(name = "Taches")
@NamedQueries({
@NamedQuery(name = "findByNom", query = "select id from Taches where nom = ?1"),
@NamedQuery(name = "findByPrenom", query = "select id from Taches where prenom = ?1"),
@NamedQuery(name = "findByDate", query = "select id from Taches where date = ?1"),
@NamedQuery(name = "findByPriorite", query = "select id from Taches where priorite = ?1")
})
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class Taches implements Serializable, InterfaceTaches {
private static final long serialVersionUID = 3718006259932821939L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "id", nullable = false)
private int id;
@Column(name = "nom")
private String nom;
@Column(name = "prenom")
private String prenom;
@Column(name = "commentaire")
private String commentaire;
@Column(name = "date")
private Date date;
@ManyToOne()
@JoinColumn(name = "refPriorite", referencedColumnName = "idpriorite", nullable=false)
private TachesPriorite refPriorite;
public Taches(){
}
public Taches(String nom, String prenom, String commentaire,Date date) {
super();
this.nom = nom;
this.prenom = prenom;
this.commentaire = commentaire;
this.date=date;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public String getPrenom() {
return prenom;
}
public void setPrenom(String prenom) {
this.prenom = prenom;
}
public String getCommentaire() {
return commentaire;
}
public void setCommentaire(String commentaire) {
this.commentaire = commentaire;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public TachesPriorite getRefPriorite() {
return refPriorite;
}
public void setRefPriorite(TachesPriorite refPriorite) {
this.refPriorite = refPriorite;
}
} |
Partager