Update
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user