Corrección de error tipográfico en el constructor VisitJPA.java
This commit is contained in:
@@ -1,109 +1,109 @@
|
|||||||
package jpa;
|
package jpa;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.FetchType;
|
import javax.persistence.FetchType;
|
||||||
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.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
* @author Marcos García Núñez (mgarcianun@uoc.edu)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "MyHealth.Visit")
|
@Table(name = "MyHealth.Visit")
|
||||||
public class VisitJPA implements Serializable {
|
public class VisitJPA implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private Date date;
|
private Date date;
|
||||||
private String time;
|
private String time;
|
||||||
private String observations;
|
private String observations;
|
||||||
private String result;
|
private String result;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class constructor methods
|
* Class constructor methods
|
||||||
*/
|
*/
|
||||||
public VistitJPA() {
|
public VisitJPA() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public VisitJPA(Integer id, Date date, Time time, String observations, String result) {
|
public VisitJPA(Integer id, Date date, Time time, String observations, String result) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.date=date;
|
this.date=date;
|
||||||
this.time = time;
|
this.time = time;
|
||||||
this.observations = observations;
|
this.observations = observations;
|
||||||
this.result = result;
|
this.result = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
@GeneratedValue(strategy=GenerationType.IDENTITY)
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(Integer value) {
|
public void setId(Integer value) {
|
||||||
this.id = value;
|
this.id = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDate() {
|
public String getDate() {
|
||||||
return date;
|
return date;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDate(String value) {
|
public void setDate(String value) {
|
||||||
this.date = value;
|
this.date = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTime() {
|
public String getTime() {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTime(String value) {
|
public void setTime(String value) {
|
||||||
this.time = value;
|
this.time = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getObservations() {
|
public String getObservations() {
|
||||||
return observations;
|
return observations;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setObservations(String observation) {
|
public void setObservations(String observation) {
|
||||||
this.observations = observations;
|
this.observations = observations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Metodos para get/set de relaciones (pacientes)
|
* Metodos para get/set de relaciones (pacientes)
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
|
||||||
@JoinColumn(name = "FamilyDoctorId")
|
@JoinColumn(name = "FamilyDoctorId")
|
||||||
public Collection<PatientJPA> getPatients() {
|
public Collection<PatientJPA> getPatients() {
|
||||||
return patients;
|
return patients;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPatients(Collection<PatientJPA> patients) {
|
public void setPatients(Collection<PatientJPA> patients) {
|
||||||
this.patients = patients;
|
this.patients = patients;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
@JoinColumn (name="PrimaryHealthCareCenterId")
|
@JoinColumn (name="PrimaryHealthCareCenterId")
|
||||||
public PrimaryHealthCareCenterJPA getPrimaryHealthCareCenter() {
|
public PrimaryHealthCareCenterJPA getPrimaryHealthCareCenter() {
|
||||||
return primaryHealthCareCenter;
|
return primaryHealthCareCenter;
|
||||||
}
|
}
|
||||||
public void setPrimaryHealthCareCenter(PrimaryHealthCareCenterJPA center) {
|
public void setPrimaryHealthCareCenter(PrimaryHealthCareCenterJPA center) {
|
||||||
this.primaryHealthCareCenter = center;
|
this.primaryHealthCareCenter = center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user