Multiples cambios para soportar la utilización de códigos de usuario
únicos para (Pacientes, medicos de familia, medicos especialista y administradores). Nuevos métodos en EJB común para consultar Entidades por Id y por código (Para el login).
This commit is contained in:
@@ -26,6 +26,8 @@ public class PatientJPA implements Serializable {
|
||||
@Column(updatable = false)
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
@Column(nullable = false, unique = true)
|
||||
private String personalIdentificationCode;
|
||||
private String nif;
|
||||
private String name;
|
||||
private String surname;
|
||||
@@ -42,7 +44,8 @@ public class PatientJPA implements Serializable {
|
||||
super();
|
||||
}
|
||||
|
||||
public PatientJPA(String nif, String name, String surname, String password, String email, FamilyDoctorJPA familyDoc) {
|
||||
public PatientJPA(String pic, String nif, String name, String surname, String password, String email, FamilyDoctorJPA familyDoc) {
|
||||
this.personalIdentificationCode = pic;
|
||||
this.nif = nif;
|
||||
this.name = name;
|
||||
this.surname = surname;
|
||||
@@ -106,4 +109,12 @@ public class PatientJPA implements Serializable {
|
||||
public void setFamilyDoctor(FamilyDoctorJPA familyDoc) {
|
||||
this.familyDoctor = familyDoc;
|
||||
}
|
||||
|
||||
public String getPersonalIdentificationCode() {
|
||||
return personalIdentificationCode;
|
||||
}
|
||||
|
||||
public void setPersonalIdentificationCode(String personalIdentificationCode) {
|
||||
this.personalIdentificationCode = personalIdentificationCode;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user