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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user