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
|
@Entity
@Inheritance(strategy=InheritanceType.JOINED)
public abstract class Personne implements Serializable, java.lang.Comparable {
@OneToMany(mappedBy = "personne", cascade=CascadeType.ALL)
private List<ElementSalaire> elementsSalaire;
@OneToMany(mappedBy = "executeur", cascade=CascadeType.ALL)
private List<Action> actionsExecution;
@OneToMany(mappedBy = "emetteur", cascade=CascadeType.ALL)
private List<Action> actionsEmission;
@OneToMany(mappedBy = "recepteur", cascade=CascadeType.ALL)
private List<Action> actionsReception;
@OneToMany(mappedBy = "evalue", cascade=CascadeType.ALL)
private List<NotationPersonne> notationsPersonne;
private static long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String nom="";
private String prenom="";
@OneToOne(cascade = CascadeType.ALL)
private Adresse adresse;
@Temporal(javax.persistence.TemporalType.DATE)
private java.util.Date dateNaissance;
private String tel="";
private String portable="";
private String fax="";
private String mail="";
private String lieuNaissance="";
private String id2="";
private String titre="";
private String nationalite="";
public Personne() {
setAdresse(new Adresse());
dateNaissance =new java.util.Date();
notationsPersonne = new Vector<NotationPersonne>();
elementsSalaire = new Vector<ElementSalaire>();
actionsEmission = new Vector<Action>();
actionsExecution = new Vector<Action>();
actionsReception = new Vector<Action>();
candidatures = new Vector<Candidature>();
}
public int compareTo(Object other) {
return this.toString().compareTo(other.toString());
}
public Personne(String titre, String nom, String prenom, Adresse adresse) {
this();
setTitre(titre);
setNom(nom);
setPrenom(prenom);
setAdresse(adresse);
}
} |
Partager