Files
myhealth/1.sources/MyHealth/src/jpa/VisitJPA.java
Alejandro Linares Amado 504886d74a Merge branch 'master' of
http://pdp-pds.eimt.uoc.edu/pds19-grupo2/myhealth.git

Conflicts:
	1.sources/MyHealth/src/jpa/VisitJPA.java
2019-12-08 19:39:47 +01:00

189 lines
3.5 KiB
Java

<<<<<<< HEAD
package jpa;
import java.io.Serializable;
import java.sql.time;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
@ManyToOne
@JoinColumn (name="FamilyDoctorId")
private FamilyDoctorJPA familyDoctor;
@ManyToOne
@JoinColumn (name="PatientId")
private PatientJPA patient;
/**
*
* @author Marcos García Núñez (mgarcianun@uoc.edu)
*
*/
@Entity
@Table(name = "MyHealth.Visit")
public class VisitJPA implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Integer id;
private Date date;
private Time time;
private String observations;
private String result;
/**
* Class constructor methods
*/
public VistitJPA() {
super();
}
public VisitJPA(Integer id, Date date, Time time, String observations, String result) {
this.id = id;
this.date=date;
this.time = time;
this.observations = observations;
this.result = result;
}
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
public Integer getId() {
return id;
}
public void setId(Integer value) {
this.id = value;
}
public String getDate() {
return date;
}
public void setDate(String value) {
this.date = value;
}
public String getTime() {
return time;
}
public void setTime(String value) {
this.time = value;
}
public String getObservations() {
return observations;
}
public void setObservations(String observation) {
this.observations = observations;
}
/**
* Methods get/set persistent relationships
*/
public FamilyDoctorJPA getFamilyDoctor() {
return familyDoctor;
}
public void setFamilyDoctor(FamilyDoctorJPA familyDoc) {
this.familyDoctor = familyDoc;
}
public PatientJPA getPatient() {
return patient;
}
public void setPatient (PatientJPA pat) {
this.patient=pat;
}
}
=======
package jpa;
import java.io.Serializable;
import java.sql.Time;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
/**
*
* @author Marcos García Núñez (mgarcianun@uoc.edu)
*
*/
@Entity
@Table(name = "MyHealth.Visit")
public class VisitJPA implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Integer id;
private Date date;
private Time time;
private String observations;
private String result;
/**
* Class constructor methods
*/
public VisitJPA() {
super();
}
public VisitJPA(Integer id, Date date, Time time, String observations, String result) {
this.id = id;
this.date=date;
this.time = time;
this.observations = observations;
this.result = result;
}
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
public Integer getId() {
return id;
}
public void setId(Integer value) {
this.id = value;
}
public Date getDate() {
return date;
}
public void setDate(Date value) {
this.date = value;
}
public Time getTime() {
return time;
}
public void setTime(Time value) {
this.time = value;
}
public String getObservations() {
return observations;
}
public void setObservations(String observation) {
this.observations = observations;
}
}
>>>>>>> branch 'master' of http://pdp-pds.eimt.uoc.edu/pds19-grupo2/myhealth.git