- Creado Question transferObject
-- Se le ha añadido la relación con FamilyDoctor inexistente en el diseño inicial -- Tiene integrado en formato String la response en lugar de un objeto (tabla en BBDD) - Modificado MedicalTest transferObject -- Se le ha creado el tipo de dato de prueba médica (en lugar de un entero sin más sentido en BL) - Actualizado el diseño de BBDD -- Con las restricciones/características anteriormente comentadas -- Todas las tablas tienen una PK como INT AI, excepto administrator - Se actualiza la interfaz para Remoto y el EJB
This commit is contained in:
102
1.sources/MyHealth/src/TO/QuestionTO.java
Normal file
102
1.sources/MyHealth/src/TO/QuestionTO.java
Normal file
@@ -0,0 +1,102 @@
|
||||
package TO;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Roberto Orden Erena <rorden@uoc.edu>
|
||||
*
|
||||
*/
|
||||
@XmlRootElement(name = "Question")
|
||||
public class QuestionTO implements Serializable {
|
||||
|
||||
public static enum QuestionStatus {
|
||||
ANSWERED, PENDING
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int id;
|
||||
private String title;
|
||||
private String message;
|
||||
private QuestionStatus status;
|
||||
private String response;
|
||||
private PatientTO patient;
|
||||
private FamilyDoctorTO fdoctor;
|
||||
|
||||
|
||||
public QuestionTO() {
|
||||
super();
|
||||
}
|
||||
|
||||
public QuestionTO(int id, String title, String message, QuestionStatus status, PatientTO patient,
|
||||
FamilyDoctorTO fdoctor, String response) {
|
||||
super();
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.patient = patient;
|
||||
this.fdoctor = fdoctor;
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public QuestionStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(QuestionStatus status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public PatientTO getPatient() {
|
||||
return patient;
|
||||
}
|
||||
|
||||
public void setPatient(PatientTO patient) {
|
||||
this.patient = patient;
|
||||
}
|
||||
|
||||
public FamilyDoctorTO getDoctor() {
|
||||
return fdoctor;
|
||||
}
|
||||
|
||||
public void setDoctor(FamilyDoctorTO fdoctor) {
|
||||
this.fdoctor = fdoctor;
|
||||
}
|
||||
|
||||
public String getResponse() {
|
||||
return response;
|
||||
}
|
||||
|
||||
public void setResponse(String response) {
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user