package TO; import java.io.Serializable; import javax.xml.bind.annotation.XmlRootElement; import common.QuestionStatus; /** * * @author Roberto Orden Erena * */ @XmlRootElement(name = "Question") public class QuestionTO implements Serializable { 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(); this.patient = new PatientTO(); this.fdoctor = new FamilyDoctorTO(); } 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; } public String toString() { return "{" + "ObjectID" + super.toString() + ",id" + this.getId() + ",title" + this.getTitle() + ",message" + this.getMessage() + ",response" + this.getResponse() + ",status" + this.getStatus() + ",patient-id" + this.getPatient().getId() + ",patient-name-surname" + this.getPatient().getName() + " " + this.getPatient().getSurname() + ",fdoctor-id" + this.getDoctor().getId() + ",fdoctor-name-surname" + this.getDoctor().getName() + " " + this.getDoctor().getSurname() + "}"; } }