Advertisement
Guest User

Untitled

a guest
Jun 25th, 2020
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. /**
  2. * This Source Code Form is subject to the terms of the Mozilla Public License,
  3. * v. 2.0. If a copy of the MPL was not distributed with this file, You can
  4. * obtain one at http://mozilla.org/MPL/2.0/. OpenMRS is also distributed under
  5. * the terms of the Healthcare Disclaimer located at http://openmrs.org/license.
  6. *
  7. * Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
  8. * graphic logo is a trademark of OpenMRS Inc.
  9. */
  10. package org.openmrs;
  11.  
  12. import java.util.Date;
  13.  
  14. import org.codehaus.jackson.annotate.JsonIgnore;
  15.  
  16. /**
  17. * FieldAnswer
  18. *
  19. * @version 1.0
  20. */
  21. public class FieldAnswer extends BaseOpenmrsObject {
  22.  
  23. public static final long serialVersionUID = 5656L;
  24.  
  25. // Fields
  26.  
  27. private Date dateCreated;
  28.  
  29. private Concept concept;
  30.  
  31. private User creator;
  32.  
  33. private Field field;
  34.  
  35. private boolean dirty;
  36.  
  37. // Constructors
  38.  
  39. /** default constructor */
  40. public FieldAnswer() {
  41. }
  42.  
  43. /**
  44. * @return boolean whether or not this fieldAnswer has been modified
  45. *
  46. * @deprecated as of 2.0, use {@link #getDirty()}
  47. */
  48. @Deprecated
  49. @JsonIgnore
  50. public boolean isDirty() {
  51. return getDirty();
  52. }
  53.  
  54. /**
  55. * @return boolean whether or not this fieldAnswer has been modified
  56. */
  57. public boolean getDirty() {
  58. return dirty;
  59. }
  60.  
  61. public void setClean() {
  62. dirty = false;
  63. }
  64.  
  65. // Property accessors
  66.  
  67. /**
  68. * @return Returns the concept.
  69. */
  70. public Concept getConcept() {
  71. return concept;
  72. }
  73.  
  74. /**
  75. * @param concept The concept to set.
  76. */
  77. public void setConcept(Concept concept) {
  78. this.dirty = true;
  79. this.concept = concept;
  80. }
  81.  
  82. /**
  83. * @return Returns the creator.
  84. */
  85. public User getCreator() {
  86. return creator;
  87. }
  88.  
  89. /**
  90. * @param creator The creator to set.
  91. */
  92. public void setCreator(User creator) {
  93. this.dirty = true;
  94. this.creator = creator;
  95. }
  96.  
  97. /**
  98. * @return Returns the dateCreated.
  99. */
  100. public Date getDateCreated() {
  101. return dateCreated;
  102. }
  103.  
  104. /**
  105. * @param dateCreated The dateCreated to set.
  106. */
  107. public void setDateCreated(Date dateCreated) {
  108. this.dirty = true;
  109. this.dateCreated = dateCreated;
  110. }
  111.  
  112. /**
  113. * @return Returns the field.
  114. */
  115. public Field getField() {
  116. return field;
  117. }
  118.  
  119. /**
  120. * @param field The field to set.
  121. */
  122. public void setField(Field field) {
  123. this.dirty = true;
  124. this.field = field;
  125. }
  126.  
  127. /**
  128. * @since 1.5
  129. * @see org.openmrs.OpenmrsObject#getId()
  130. */
  131. @Override
  132. public Integer getId() {
  133. throw new UnsupportedOperationException();
  134. }
  135.  
  136. /**
  137. * @since 1.5
  138. * @see org.openmrs.OpenmrsObject#setId(java.lang.Integer)
  139. */
  140. @Override
  141. public void setId(Integer id) {
  142. throw new UnsupportedOperationException();
  143. }
  144.  
  145. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement