Update
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
package ejb.medicalTest;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.ejb.Remote;
|
||||
|
||||
import TO.MedicalSpecialtyTO;
|
||||
|
||||
/**
|
||||
* Interfaz remota del EJB Definimos los métodos que estarán disponibles para
|
||||
* los clientes del EJB
|
||||
@@ -11,8 +15,14 @@ import javax.ejb.Remote;
|
||||
*/
|
||||
@Remote
|
||||
public interface MedicalTestFacadeRemote {
|
||||
/**
|
||||
* Definimos la interfaz remota
|
||||
*/
|
||||
public void ejbMethod(String parameter);
|
||||
public void askQuestion(int professionalNumber, String title, String message);
|
||||
public void answerQuestion(String question, String response);
|
||||
public void listAllPendingQuestions(int professionalNumber);
|
||||
public void addMedicalTest(int idMedicalTest, Date date, long time, int testType, String observations);
|
||||
public void getMedicalTest(int idMedicalTest);
|
||||
public void getQuestion(String question);
|
||||
public void addImage(int idMedicalTest, String image);
|
||||
public void updateImage(int idMedicalTest, String image);
|
||||
public void removeImage(int idMedicalTest);
|
||||
public void findSpecialistDoctorByMedicalSpeciality(MedicalSpecialtyTO speciality);
|
||||
}
|
||||
69
1.sources/MyHealth/src/jpa/ImageJPA.java
Normal file
69
1.sources/MyHealth/src/jpa/ImageJPA.java
Normal file
@@ -0,0 +1,69 @@
|
||||
package jpa;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import TO.PatientTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "MyHealth.Question")
|
||||
public class ImageJPA implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
private int id;
|
||||
private String response;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn (name="QuestionId")
|
||||
private PatientTO question;
|
||||
|
||||
public ImageJPA() {
|
||||
}
|
||||
|
||||
public ImageJPA(int id, String response, PatientTO question) {
|
||||
this.id = id;
|
||||
this.response = response;
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getResponse() {
|
||||
return response;
|
||||
}
|
||||
|
||||
public void setResponse(String response) {
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public PatientTO getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
public void setQuestion(PatientTO question) {
|
||||
this.question = question;
|
||||
}
|
||||
}
|
||||
92
1.sources/MyHealth/src/jpa/QuestionJPA.java
Normal file
92
1.sources/MyHealth/src/jpa/QuestionJPA.java
Normal file
@@ -0,0 +1,92 @@
|
||||
package jpa;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import TO.PatientTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "MyHealth.Question")
|
||||
public class QuestionJPA implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
private int id;
|
||||
private String title;
|
||||
private String message;
|
||||
private int status;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn (name="PatientId")
|
||||
private PatientTO patient;
|
||||
|
||||
public QuestionJPA() {
|
||||
}
|
||||
|
||||
public QuestionJPA(int id, String title, String message, int status, PatientTO patient) {
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.message = message;
|
||||
this.status = status;
|
||||
this.patient = patient;
|
||||
}
|
||||
|
||||
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 int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public PatientTO getPatient() {
|
||||
return patient;
|
||||
}
|
||||
|
||||
public void setPatient(PatientTO patient) {
|
||||
this.patient = patient;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
69
1.sources/MyHealth/src/jpa/ResponseJPA.java
Normal file
69
1.sources/MyHealth/src/jpa/ResponseJPA.java
Normal file
@@ -0,0 +1,69 @@
|
||||
package jpa;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import TO.PatientTO;
|
||||
import TO.SpecialistDoctorTO;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "MyHealth.Question")
|
||||
public class ResponseJPA implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||
private int id;
|
||||
private String response;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn (name="QuestionId")
|
||||
private PatientTO question;
|
||||
|
||||
public ResponseJPA() {
|
||||
}
|
||||
|
||||
public ResponseJPA(int id, String response, PatientTO question) {
|
||||
this.id = id;
|
||||
this.response = response;
|
||||
this.question = question;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getResponse() {
|
||||
return response;
|
||||
}
|
||||
|
||||
public void setResponse(String response) {
|
||||
this.response = response;
|
||||
}
|
||||
|
||||
public PatientTO getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
public void setQuestion(PatientTO question) {
|
||||
this.question = question;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user