Auto reorganización de imports. Eliminación de warnings.
This commit is contained in:
@@ -10,19 +10,14 @@ import javax.persistence.EntityManager;
|
|||||||
import javax.persistence.PersistenceContext;
|
import javax.persistence.PersistenceContext;
|
||||||
import javax.persistence.TypedQuery;
|
import javax.persistence.TypedQuery;
|
||||||
|
|
||||||
import TO.LoggedUserTO;
|
|
||||||
import TO.MedicalSpecialtyTO;
|
|
||||||
import TO.QuestionTO;
|
import TO.QuestionTO;
|
||||||
import TO.SpecialistDoctorTO;
|
import TO.SpecialistDoctorTO;
|
||||||
import common.MedicalTestType;
|
import common.MedicalTestType;
|
||||||
import common.QuestionStatus;
|
import common.QuestionStatus;
|
||||||
import common.UserType;
|
|
||||||
import ejb.common.CommonFacadeLocal;
|
import ejb.common.CommonFacadeLocal;
|
||||||
import jpa.FamilyDoctorJPA;
|
|
||||||
import jpa.PatientJPA;
|
import jpa.PatientJPA;
|
||||||
import jpa.QuestionJPA;
|
import jpa.QuestionJPA;
|
||||||
import jpa.SpecialistDoctorJPA;
|
import jpa.SpecialistDoctorJPA;
|
||||||
import managedbean.common.SessionUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EJB Session Bean Class para la Practica 2, Ejercicio 1 (ISCSD) Implementa los métodos de la capa de negocio que implementan la logica de negocio y la interacción con la capa de
|
* EJB Session Bean Class para la Practica 2, Ejercicio 1 (ISCSD) Implementa los métodos de la capa de negocio que implementan la logica de negocio y la interacción con la capa de
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import javax.ejb.Remote;
|
|||||||
|
|
||||||
import TO.LoggedUserTO;
|
import TO.LoggedUserTO;
|
||||||
import TO.MedicalSpecialtyTO;
|
import TO.MedicalSpecialtyTO;
|
||||||
import TO.PatientTO;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -11,14 +11,7 @@ import javax.persistence.PersistenceContext;
|
|||||||
import javax.persistence.TypedQuery;
|
import javax.persistence.TypedQuery;
|
||||||
|
|
||||||
import TO.VisitTO;
|
import TO.VisitTO;
|
||||||
import common.HashUtils;
|
|
||||||
import common.QuestionStatus;
|
|
||||||
import common.Utils;
|
|
||||||
import ejb.common.CommonFacadeLocal;
|
import ejb.common.CommonFacadeLocal;
|
||||||
import jpa.FamilyDoctorJPA;
|
|
||||||
import jpa.MedicalSpecialtyJPA;
|
|
||||||
import jpa.QuestionJPA;
|
|
||||||
import jpa.SpecialistDoctorJPA;
|
|
||||||
import jpa.VisitJPA;
|
import jpa.VisitJPA;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import javax.persistence.JoinColumn;
|
|||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
import TO.QuestionTO;
|
|
||||||
import common.QuestionStatus;
|
import common.QuestionStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ public class AuthorizationFilter implements Filter {
|
|||||||
|
|
||||||
resp = (HttpServletResponse) response;
|
resp = (HttpServletResponse) response;
|
||||||
|
|
||||||
//TODO: Eliminar este código al terminar el desarrollo.
|
// TODO: Eliminar este código al terminar el desarrollo.
|
||||||
//Realizamos un login automatico (para agilizar el desarrollo.
|
// Realizamos un login automatico (para agilizar el desarrollo.
|
||||||
if (Debug == true) {
|
if (Debug == true) {
|
||||||
ses = req.getSession(true);
|
ses = req.getSession(true);
|
||||||
|
|
||||||
@@ -69,6 +69,10 @@ public class AuthorizationFilter implements Filter {
|
|||||||
login.setPassword("asdf");
|
login.setPassword("asdf");
|
||||||
boolean result = login.autoLogin(ses);
|
boolean result = login.autoLogin(ses);
|
||||||
|
|
||||||
|
if (result == true)
|
||||||
|
SessionUtils.addMessage(ses, FacesMessage.SEVERITY_ERROR, "Login automático correcto", "Se ha realizado un login automático correctamente.");
|
||||||
|
else
|
||||||
|
SessionUtils.addMessage(ses, FacesMessage.SEVERITY_ERROR, "El login automático ha fallado.", "No se ha podido realizar el login automático.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ public class QuestionsMBean extends ManagedBeanBase implements Serializable {
|
|||||||
private int userID;
|
private int userID;
|
||||||
private UserType userType;
|
private UserType userType;
|
||||||
private List<QuestionTO> pendingQuestions;
|
private List<QuestionTO> pendingQuestions;
|
||||||
private Integer id;
|
|
||||||
private QuestionTO selected;
|
private QuestionTO selected;
|
||||||
private boolean addNewMode;
|
private boolean addNewMode;
|
||||||
|
|
||||||
@@ -51,9 +50,9 @@ public class QuestionsMBean extends ManagedBeanBase implements Serializable {
|
|||||||
public void setPendingQuestions(List<QuestionTO> value) {
|
public void setPendingQuestions(List<QuestionTO> value) {
|
||||||
this.pendingQuestions = value;
|
this.pendingQuestions = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cargará las preguntas enviadas al médico o escritas por el paciente, esto irá
|
* Cargará las preguntas enviadas al médico o escritas por el paciente, esto irá en función del tipo de usuario en sesión
|
||||||
* en función del tipo de usuario en sesión
|
|
||||||
*/
|
*/
|
||||||
private void loadQuestions() {
|
private void loadQuestions() {
|
||||||
if (this.userType == UserType.FAMILY_DOCTOR) {
|
if (this.userType == UserType.FAMILY_DOCTOR) {
|
||||||
|
|||||||
@@ -8,16 +8,13 @@ import javax.annotation.PostConstruct;
|
|||||||
import javax.faces.view.ViewScoped;
|
import javax.faces.view.ViewScoped;
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
|
||||||
import org.primefaces.event.SelectEvent;
|
|
||||||
import org.primefaces.model.LazyDataModel;
|
import org.primefaces.model.LazyDataModel;
|
||||||
import org.primefaces.model.SortOrder;
|
import org.primefaces.model.SortOrder;
|
||||||
|
|
||||||
import TO.MedicalSpecialtyTO;
|
import TO.MedicalSpecialtyTO;
|
||||||
import TO.SpecialistDoctorTO;
|
import TO.SpecialistDoctorTO;
|
||||||
import common.Constants;
|
import common.Constants;
|
||||||
import common.UserType;
|
|
||||||
import managedbean.common.ManagedBeanBase;
|
import managedbean.common.ManagedBeanBase;
|
||||||
import managedbean.common.SessionUtils;
|
|
||||||
|
|
||||||
@Named("sspec")
|
@Named("sspec")
|
||||||
@ViewScoped
|
@ViewScoped
|
||||||
@@ -25,8 +22,6 @@ public class SearchSpecialistMBean extends ManagedBeanBase implements Serializab
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private int userID;
|
|
||||||
private UserType userType;
|
|
||||||
private List<MedicalSpecialtyTO> medicalSpecialitiesList;
|
private List<MedicalSpecialtyTO> medicalSpecialitiesList;
|
||||||
private MedicalSpecialtyTO medicalSpeciality;
|
private MedicalSpecialtyTO medicalSpeciality;
|
||||||
private String lastUIQueryMS;
|
private String lastUIQueryMS;
|
||||||
@@ -38,8 +33,6 @@ public class SearchSpecialistMBean extends ManagedBeanBase implements Serializab
|
|||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
// Inicialización de variables y propiedades van aquí.
|
// Inicialización de variables y propiedades van aquí.
|
||||||
this.userType = SessionUtils.getUserType();
|
|
||||||
this.userID = Integer.valueOf(SessionUtils.getUserId());
|
|
||||||
this.medicalSpecialitiesList = this.getRemoteManagerCommon().listMedicalSpecialitiesPaged(0, Constants.MAX_ITEMS_AUTOCOMPLETE_SEARCH);
|
this.medicalSpecialitiesList = this.getRemoteManagerCommon().listMedicalSpecialitiesPaged(0, Constants.MAX_ITEMS_AUTOCOMPLETE_SEARCH);
|
||||||
this.medicalSpeciality = null;
|
this.medicalSpeciality = null;
|
||||||
this.lastUIQueryMS = "";
|
this.lastUIQueryMS = "";
|
||||||
|
|||||||
@@ -3,21 +3,13 @@ package managedbean.visit;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.Time;
|
import java.sql.Time;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.enterprise.context.RequestScoped;
|
import javax.enterprise.context.RequestScoped;
|
||||||
import javax.faces.application.FacesMessage;
|
|
||||||
import javax.faces.context.FacesContext;
|
|
||||||
import javax.inject.Named;
|
import javax.inject.Named;
|
||||||
|
|
||||||
import org.primefaces.model.LazyDataModel;
|
|
||||||
import org.primefaces.model.SortOrder;
|
|
||||||
|
|
||||||
import TO.FamilyDoctorTO;
|
import TO.FamilyDoctorTO;
|
||||||
import TO.PatientTO;
|
import TO.PatientTO;
|
||||||
import TO.VisitTO;
|
|
||||||
import managedbean.common.ManagedBeanBase;
|
import managedbean.common.ManagedBeanBase;
|
||||||
import managedbean.common.SessionUtils;
|
import managedbean.common.SessionUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
package managedbean.visit;
|
package managedbean.visit;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.sql.Time;
|
|
||||||
import java.time.LocalTime;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.enterprise.context.RequestScoped;
|
|
||||||
import javax.faces.application.FacesMessage;
|
import javax.faces.application.FacesMessage;
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
import javax.faces.view.ViewScoped;
|
import javax.faces.view.ViewScoped;
|
||||||
@@ -16,7 +13,6 @@ import javax.inject.Named;
|
|||||||
import TO.FamilyDoctorTO;
|
import TO.FamilyDoctorTO;
|
||||||
import TO.PatientTO;
|
import TO.PatientTO;
|
||||||
import TO.VisitTO;
|
import TO.VisitTO;
|
||||||
import common.UserType;
|
|
||||||
import managedbean.common.ManagedBeanBase;
|
import managedbean.common.ManagedBeanBase;
|
||||||
import managedbean.common.SessionUtils;
|
import managedbean.common.SessionUtils;
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import java.util.Date;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.enterprise.context.RequestScoped;
|
|
||||||
import javax.faces.application.FacesMessage;
|
import javax.faces.application.FacesMessage;
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
import javax.faces.view.ViewScoped;
|
import javax.faces.view.ViewScoped;
|
||||||
|
|||||||
Reference in New Issue
Block a user