Cambios para la edición del perfil de usuario y su actualización (Vista,

managed bean, metodos en EJB para recuperar datos de Paciente, Medico de
familia y medico especialista).
This commit is contained in:
Marcos Garcia Nuñez
2019-12-08 22:26:15 +01:00
parent f8d69e9e12
commit e718afeb3a
12 changed files with 560 additions and 153 deletions

View File

@@ -26,13 +26,18 @@ public class FamilyDoctorJPA implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private int id;
@GeneratedValue(strategy=GenerationType.IDENTITY)
private Integer id;
private String nif;
private String name;
private String surname;
private String password;
private String email;
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "FamilyDoctorId")
private Collection<PatientJPA> patients;
@ManyToOne
@JoinColumn (name="PrimaryHealthCareCenterId")
private PrimaryHealthCareCenterJPA primaryHealthCareCenter;
/**
@@ -51,13 +56,11 @@ public class FamilyDoctorJPA implements Serializable {
this.primaryHealthCareCenter = phc;
}
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
public int getId() {
public Integer getId() {
return id;
}
public void setId(int value) {
public void setId(Integer value) {
this.id = value;
}
@@ -105,8 +108,6 @@ public class FamilyDoctorJPA implements Serializable {
* Metodos para get/set de relaciones (pacientes)
* @return
*/
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "FamilyDoctorId")
public Collection<PatientJPA> getPatients() {
return patients;
}
@@ -115,8 +116,6 @@ public class FamilyDoctorJPA implements Serializable {
this.patients = patients;
}
@ManyToOne
@JoinColumn (name="PrimaryHealthCareCenterId")
public PrimaryHealthCareCenterJPA getPrimaryHealthCareCenter() {
return primaryHealthCareCenter;
}