CensusEntry.java 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  1. /*
  2. * Copyright (c) Andrew Grant of Carrick Software 19/03/2025, 01:34. All rights reserved.
  3. *
  4. */
  5. package scot.carricksoftware.grants.domains.census;
  6. import jakarta.persistence.*;
  7. import scot.carricksoftware.grants.BaseEntity;
  8. import scot.carricksoftware.grants.domains.people.Person;
  9. import scot.carricksoftware.grants.enums.censusentry.*;
  10. import scot.carricksoftware.grants.enums.general.YesNo;
  11. @Entity
  12. public class CensusEntry extends BaseEntity {
  13. private String name;
  14. @SuppressWarnings("JpaDataSourceORMInspection")
  15. @ManyToOne
  16. @JoinColumn(name = "`census_id`")
  17. private Census census;
  18. @SuppressWarnings("JpaDataSourceORMInspection")
  19. @ManyToOne
  20. @JoinColumn(name = "`person_id`")
  21. private Person person;
  22. @SuppressWarnings("JpaDataSourceORMInspection")
  23. @Enumerated(EnumType.STRING)
  24. @Column(name = "`relationship`")
  25. private CensusEntryRelationship relationship;
  26. @SuppressWarnings("JpaDataSourceORMInspection")
  27. @Enumerated(EnumType.STRING)
  28. @Column(name = "`gaelic`")
  29. private CensusEntryGaelic gaelic;
  30. @SuppressWarnings("JpaDataSourceORMInspection")
  31. @Enumerated(EnumType.STRING)
  32. @Column(name = "`condition`")
  33. private CensusEntryCondition condition;
  34. @SuppressWarnings("JpaDataSourceORMInspection")
  35. @Enumerated(EnumType.STRING)
  36. @Column(name = "`worker`")
  37. private CensusEntryWorker worker;
  38. @SuppressWarnings("JpaDataSourceORMInspection")
  39. @Enumerated(EnumType.STRING)
  40. @Column(name = "`sex`")
  41. private CensusEntrySex sex;
  42. @SuppressWarnings("JpaDataSourceORMInspection")
  43. @Column(name = "`age`")
  44. private String age;
  45. @SuppressWarnings("JpaDataSourceORMInspection")
  46. @Column(name = "`where_born`")
  47. private String whereBorn;
  48. @SuppressWarnings("JpaDataSourceORMInspection")
  49. @Column(name = "`birth_day`")
  50. private String birthDay;
  51. @SuppressWarnings("JpaDataSourceORMInspection")
  52. @Column(name = "`birth_year`")
  53. private String birthYear;
  54. @SuppressWarnings("JpaDataSourceORMInspection")
  55. @Column(name = "`personal_occupation`")
  56. private String personalOccupation;
  57. @SuppressWarnings("JpaDataSourceORMInspection")
  58. @Column(name = "`notes`")
  59. private String notes;
  60. @SuppressWarnings("JpaDataSourceORMInspection")
  61. @Column(name = "`children_who_have_died`")
  62. private String childrenWhoHaveDied;
  63. @SuppressWarnings("JpaDataSourceORMInspection")
  64. @Column(name = "`children_still_alive`")
  65. private String childrenStillAlive;
  66. @SuppressWarnings("JpaDataSourceORMInspection")
  67. @Column(name = "`children_born_alive`")
  68. private String childrenBornAlive;
  69. @SuppressWarnings("JpaDataSourceORMInspection")
  70. @Column(name = "`years_Completed_Marriage`")
  71. private String yearsCompletedMarriage;
  72. @SuppressWarnings("JpaDataSourceORMInspection")
  73. @Enumerated(EnumType.STRING)
  74. @Column(name = "`working_at_home`")
  75. private YesNo workingAtHome;
  76. @SuppressWarnings("JpaDataSourceORMInspection")
  77. @Column(name = "`industry_or_service`")
  78. private String industryOrService;
  79. public Person getPerson() {
  80. return person;
  81. }
  82. public void setPerson(Person person) {
  83. this.person = person;
  84. }
  85. public String getName() {
  86. return name;
  87. }
  88. public void setName(String name) {
  89. this.name = name;
  90. }
  91. public Census getCensus() {
  92. return census;
  93. }
  94. public void setCensus(Census census) {
  95. this.census = census;
  96. }
  97. public String toString() {
  98. return census.toString();
  99. }
  100. public CensusEntryRelationship getRelationship() {
  101. return relationship;
  102. }
  103. public void setRelationship(CensusEntryRelationship relationship) {
  104. this.relationship = relationship;
  105. }
  106. public CensusEntryCondition getCondition() {
  107. return this.condition;
  108. }
  109. public void setCondition(CensusEntryCondition condition) {
  110. this.condition = condition;
  111. }
  112. public CensusEntryGaelic getGaelic() {
  113. return this.gaelic;
  114. }
  115. public void setGaelic(CensusEntryGaelic gaelic) {
  116. this.gaelic = gaelic;
  117. }
  118. public CensusEntryWorker getWorker() {
  119. return this.worker;
  120. }
  121. public void setWorker(CensusEntryWorker worker) {
  122. this.worker = worker;
  123. }
  124. public String getAge() {
  125. return this.age;
  126. }
  127. public void setAge(String age) {
  128. this.age = age;
  129. }
  130. public String getWhereBorn() {
  131. return this.whereBorn;
  132. }
  133. public void setWhereBorn(String whereBorn) {
  134. this.whereBorn = whereBorn;
  135. }
  136. public CensusEntrySex getSex() {
  137. return this.sex;
  138. }
  139. public void setSex(CensusEntrySex sex) {
  140. this.sex = sex;
  141. }
  142. public String getBirthDay() {
  143. return this.birthDay;
  144. }
  145. public void setBirthDay(String birthDay) {
  146. this.birthDay = birthDay;
  147. }
  148. public String getBirthYear() {
  149. return this.birthYear;
  150. }
  151. public void setBirthYear(String birthYear) {
  152. this.birthYear = birthYear;
  153. }
  154. public String getPersonalOccupation() {
  155. return this.personalOccupation;
  156. }
  157. public void setPersonalOccupation(String occupation) {
  158. this.personalOccupation = occupation;
  159. }
  160. public String getNotes() {
  161. return notes;
  162. }
  163. public void setNotes(String notes) {
  164. this.notes = notes;
  165. }
  166. public String getChildrenWhoHaveDied() {
  167. return childrenWhoHaveDied;
  168. }
  169. public void setChildrenWhoHaveDied(String childrenWhoHaveDied) {
  170. this.childrenWhoHaveDied = childrenWhoHaveDied;
  171. }
  172. public String getChildrenStillAlive() {
  173. return childrenStillAlive;
  174. }
  175. public void setChildrenStillAlive(String childrenStillAlive) {
  176. this.childrenStillAlive = childrenStillAlive;
  177. }
  178. public String getChildrenBornAlive() {
  179. return childrenBornAlive;
  180. }
  181. public void setChildrenBornAlive(String childrenBornAlive) {
  182. this.childrenBornAlive = childrenBornAlive;
  183. }
  184. public String getYearsCompletedMarriage() {
  185. return yearsCompletedMarriage;
  186. }
  187. public void setYearsCompletedMarriage(String yearsCompletedMarriage) {
  188. this.yearsCompletedMarriage = yearsCompletedMarriage;
  189. }
  190. public YesNo getWorkingAtHome() {
  191. return workingAtHome;
  192. }
  193. public void setWorkingAtHome(YesNo yesNo) {
  194. this.workingAtHome = yesNo;
  195. }
  196. public String getIndustryOrService() {
  197. return industryOrService;
  198. }
  199. public void setIndustryOrService(String industryOrService) {
  200. this.industryOrService = industryOrService;
  201. }
  202. }