Corrección de error tipográfico en el constructor VisitJPA.java
This commit is contained in:
@@ -1,109 +1,109 @@
|
||||
package jpa;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
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 String 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Metodos para get/set de relaciones (pacientes)
|
||||
* @return
|
||||
*/
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||
@JoinColumn(name = "FamilyDoctorId")
|
||||
public Collection<PatientJPA> getPatients() {
|
||||
return patients;
|
||||
}
|
||||
|
||||
public void setPatients(Collection<PatientJPA> patients) {
|
||||
this.patients = patients;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn (name="PrimaryHealthCareCenterId")
|
||||
public PrimaryHealthCareCenterJPA getPrimaryHealthCareCenter() {
|
||||
return primaryHealthCareCenter;
|
||||
}
|
||||
public void setPrimaryHealthCareCenter(PrimaryHealthCareCenterJPA center) {
|
||||
this.primaryHealthCareCenter = center;
|
||||
}
|
||||
}
|
||||
package jpa;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
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 String 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 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Metodos para get/set de relaciones (pacientes)
|
||||
* @return
|
||||
*/
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||
@JoinColumn(name = "FamilyDoctorId")
|
||||
public Collection<PatientJPA> getPatients() {
|
||||
return patients;
|
||||
}
|
||||
|
||||
public void setPatients(Collection<PatientJPA> patients) {
|
||||
this.patients = patients;
|
||||
}
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn (name="PrimaryHealthCareCenterId")
|
||||
public PrimaryHealthCareCenterJPA getPrimaryHealthCareCenter() {
|
||||
return primaryHealthCareCenter;
|
||||
}
|
||||
public void setPrimaryHealthCareCenter(PrimaryHealthCareCenterJPA center) {
|
||||
this.primaryHealthCareCenter = center;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user