Advertisement
Guest User

Untitled

a guest
May 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.55 KB | None | 0 0
  1. package at.jku.se.healthmanager.domain;
  2.  
  3.  
  4.  
  5. import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  6.  
  7. import javax.persistence.*;
  8.  
  9. import java.io.Serializable;
  10. import java.time.ZonedDateTime;
  11. import java.util.Objects;
  12. import java.util.HashSet;
  13. import java.util.Collections;
  14.  
  15. /**
  16. * A BloodPressureEntry.
  17. */
  18. @Entity
  19. @Table(name = "blood_pressure_entry")
  20. public class BloodPressureEntry implements Serializable {
  21.  
  22. private static final long serialVersionUID = 1L;
  23.  
  24. @Id
  25. @GeneratedValue(strategy = GenerationType.IDENTITY)
  26. private Long id;
  27.  
  28. @Column(name = "sys_blood")
  29. private Integer sysBlood;
  30.  
  31. @Column(name = "dias_blood")
  32. private Integer diasBlood;
  33.  
  34. @Column(name = "jhi_create")
  35. private ZonedDateTime create;
  36.  
  37. @ManyToOne
  38. @JsonIgnoreProperties("bloodPressureEntries")
  39. private BloodPressureData bloodPressureData;
  40.  
  41. @OneToOne
  42. @JoinColumn(unique = true)
  43. private PulsEntry puls;
  44.  
  45. // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
  46. public Long getId() {
  47. return id;
  48. }
  49.  
  50. public void setId(Long id) {
  51. this.id = id;
  52. }
  53.  
  54. public Integer getSysBlood() {
  55. return sysBlood;
  56. }
  57.  
  58. public BloodPressureEntry sysBlood(Integer sysBlood) {
  59. this.sysBlood = sysBlood;
  60. return this;
  61. }
  62.  
  63. public void setSysBlood(Integer sysBlood) {
  64. this.sysBlood = sysBlood;
  65. }
  66.  
  67. public Integer getDiasBlood() {
  68. return diasBlood;
  69. }
  70.  
  71. public BloodPressureEntry diasBlood(Integer diasBlood) {
  72. this.diasBlood = diasBlood;
  73. return this;
  74. }
  75.  
  76. public void setDiasBlood(Integer diasBlood) {
  77. this.diasBlood = diasBlood;
  78. }
  79.  
  80. public ZonedDateTime getCreate() {
  81. return create;
  82. }
  83.  
  84. public BloodPressureEntry create(ZonedDateTime create) {
  85. this.create = create;
  86. return this;
  87. }
  88.  
  89. public void setCreate(ZonedDateTime create) {
  90. this.create = create;
  91. }
  92.  
  93.  
  94.  
  95. public BloodPressureEntry bloodPressureData(BloodPressureData bloodPressureData) {
  96. this.bloodPressureData = bloodPressureData;
  97. return this;
  98. }
  99.  
  100. public void setBloodPressureData(BloodPressureData bloodPressureData) {
  101. this.bloodPressureData = bloodPressureData;
  102. }
  103.  
  104. public PulsEntry getPuls() {
  105. return puls;
  106. }
  107.  
  108. public BloodPressureEntry puls(PulsEntry pulsEntry) {
  109. this.puls = pulsEntry;
  110. return this;
  111. }
  112.  
  113. public void setPuls(PulsEntry pulsEntry) {
  114. this.puls = pulsEntry;
  115. }
  116. // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
  117.  
  118. @Override
  119. public boolean equals(Object o) {
  120. if (this == o) {
  121. return true;
  122. }
  123. if (o == null || getClass() != o.getClass()) {
  124. return false;
  125. }
  126. BloodPressureEntry bloodPressureEntry = (BloodPressureEntry) o;
  127. if (bloodPressureEntry.getId() == null || getId() == null) {
  128. return false;
  129. }
  130. return Objects.equals(getId(), bloodPressureEntry.getId());
  131. }
  132.  
  133. @Override
  134. public int hashCode() {
  135. return Objects.hashCode(getId());
  136. }
  137.  
  138. @Override
  139. public String toString() {
  140. return "BloodPressureEntry{" +
  141. "id=" + getId() +
  142. ", sysBlood=" + getSysBlood() +
  143. ", diasBlood=" + getDiasBlood() +
  144. ", create='" + getCreate() + "'" +
  145. "}";
  146. }
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement