Avances en la pantalla de registro de usuarios nuevos (pacientes).
* Actualización de script para crear tablas (Todo a minusculas, no case sensitive) * Script de datos de pruebas de especialides médicas. * Nuevo bean para registro de usuarios (Quidato de filtro de seguridad de login, acceso sin login). * Actualización de entidades JPA con campos Identity. * Enumerado para gestionar tipos de usuarios (Paciente, Medico Familia, Especialista y Administrador) * Clase común para realizar validaciones (función para validar nif).
This commit is contained in:
@@ -3,6 +3,8 @@ package jpa;
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
@@ -20,7 +22,7 @@ public class SpecialistDoctorJPA implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
private Integer id;
|
||||
private String nif;
|
||||
private String name;
|
||||
private String surname;
|
||||
@@ -35,7 +37,7 @@ public class SpecialistDoctorJPA implements Serializable {
|
||||
super();
|
||||
}
|
||||
|
||||
public SpecialistDoctorJPA(String id, String nif, String name, String surname, String password, String email) {
|
||||
public SpecialistDoctorJPA(Integer id, String nif, String name, String surname, String password, String email) {
|
||||
this.id = id;
|
||||
this.nif = nif;
|
||||
this.name = name;
|
||||
@@ -45,11 +47,12 @@ public class SpecialistDoctorJPA implements Serializable {
|
||||
}
|
||||
|
||||
@Id
|
||||
public String getId() {
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String value) {
|
||||
public void setId(Integer value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user