Correcciones en clases VisiJPA y VisitTO para que compile el proyecto.

This commit is contained in:
Marcos Garcia Nuñez
2019-12-08 23:30:20 +01:00
parent a369839770
commit bfe2aa066e
2 changed files with 22 additions and 21 deletions

View File

@@ -1,6 +1,8 @@
package TO; package TO;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Time;
import java.util.Date;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
@@ -34,19 +36,19 @@ public class VisitTO implements Serializable {
} }
public VisitTO(Integer id, Date date, Time time, String observation, String result) { public VisitTO(Integer id, Date date, Time time, String observation, String result) {
this.setId(id); this.setId(id);
this date=date; this.date=date;
this time //this.time
1} }
public Integer getId() { public Integer getId() {
return this.id; return this.id;
} }
public void setId(integer id) { public void setId(Integer id) {
this.id=id; this.id=id;
} }
public Date getDate() { public Date getDate() {
return this.Date; return this.date;
} }
public void setDate(Date date) { public void setDate(Date date) {

View File

@@ -1,23 +1,17 @@
<<<<<<< HEAD
package jpa; package jpa;
import java.io.Serializable; import java.io.Serializable;
import java.sql.time; import java.sql.Time;
import java.util.Date; import java.util.Date;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType; import javax.persistence.GenerationType;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.JoinColumn; import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne; import javax.persistence.ManyToOne;
@ManyToOne import javax.persistence.Table;
@JoinColumn (name="FamilyDoctorId")
private FamilyDoctorJPA familyDoctor;
@ManyToOne
@JoinColumn (name="PatientId")
private PatientJPA patient;
/** /**
* *
@@ -36,12 +30,17 @@ public class VisitJPA implements Serializable {
private Time time; private Time time;
private String observations; private String observations;
private String result; private String result;
@ManyToOne
@JoinColumn (name="FamilyDoctorId")
private FamilyDoctorJPA familyDoctor;
@ManyToOne
@JoinColumn (name="PatientId")
private PatientJPA patient;
/** /**
* Class constructor methods * Class constructor methods
*/ */
public VistitJPA() { public VisitJPA() {
super(); super();
} }
@@ -63,19 +62,19 @@ public class VisitJPA implements Serializable {
this.id = value; this.id = value;
} }
public String getDate() { public Date getDate() {
return date; return date;
} }
public void setDate(String value) { public void setDate(Date value) {
this.date = value; this.date = value;
} }
public String getTime() { public Time getTime() {
return time; return time;
} }
public void setTime(String value) { public void setTime(Time value) {
this.time = value; this.time = value;
} }