1 package org.kuali.ole.deliver.bo;
2
3 import org.kuali.ole.deliver.api.OlePatronNotesContract;
4 import org.kuali.ole.deliver.api.OlePatronNotesDefinition;
5 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
6
7 import java.util.LinkedHashMap;
8
9
10
11
12 public class OlePatronNotes extends PersistableBusinessObjectBase implements OlePatronNotesContract {
13
14 private String patronNoteId;
15 private String olePatronId;
16 private String patronNoteTypeId;
17 private String patronNoteText;
18 private boolean active;
19 private OlePatronNoteType olePatronNoteType;
20 private OlePatronDocument olePatron;
21
22
23
24
25
26
27 public String getPatronNoteId() {
28 return patronNoteId;
29 }
30
31
32
33
34
35
36 public void setPatronNoteId(String patronNoteId) {
37 this.patronNoteId = patronNoteId;
38 }
39
40
41
42
43
44
45 public String getOlePatronId() {
46 return olePatronId;
47 }
48
49
50
51
52
53
54 public void setOlePatronId(String olePatronId) {
55 this.olePatronId = olePatronId;
56 }
57
58
59
60
61
62
63 public String getPatronNoteTypeId() {
64 return patronNoteTypeId;
65 }
66
67
68
69
70
71
72 public void setPatronNoteTypeId(String patronNoteTypeId) {
73 this.patronNoteTypeId = patronNoteTypeId;
74 }
75
76
77
78
79
80
81 public String getPatronNoteText() {
82 return patronNoteText;
83 }
84
85
86
87
88
89
90 public void setPatronNoteText(String patronNoteText) {
91 this.patronNoteText = patronNoteText;
92 }
93
94
95
96
97
98
99 public boolean isActive() {
100 return active;
101 }
102
103
104
105
106
107
108 public void setActive(boolean active) {
109 this.active = active;
110 }
111
112
113
114
115
116
117 public OlePatronNoteType getOlePatronNoteType() {
118 return olePatronNoteType;
119 }
120
121
122
123
124
125
126
127 public void setOlePatronNoteType(OlePatronNoteType olePatronNoteType) {
128 this.olePatronNoteType = olePatronNoteType;
129 }
130
131
132
133
134
135
136 public OlePatronDocument getOlePatron() {
137 return olePatron;
138 }
139
140
141
142
143
144
145 public void setOlePatron(OlePatronDocument olePatron) {
146 this.olePatron = olePatron;
147 }
148
149 protected LinkedHashMap toStringMapper() {
150 LinkedHashMap toStringMap = new LinkedHashMap();
151 toStringMap.put("patronNoteId", patronNoteId);
152 return toStringMap;
153 }
154
155
156
157
158
159
160
161 public static OlePatronNotesDefinition to(OlePatronNotes bo) {
162 if (bo == null) {
163 return null;
164 }
165 return OlePatronNotesDefinition.Builder.create(bo).build();
166 }
167
168
169
170
171
172
173
174 public static OlePatronNotes from(OlePatronNotesDefinition im) {
175 if (im == null) {
176 return null;
177 }
178
179 OlePatronNotes bo = new OlePatronNotes();
180 bo.patronNoteId = im.getPatronNoteId();
181 bo.olePatronId = im.getOlePatronId();
182
183 bo.olePatronNoteType = OlePatronNoteType.from(im.getOlePatronNoteType());
184 bo.patronNoteTypeId = im.getOlePatronNoteType().getPatronNoteTypeId();
185 bo.patronNoteText = im.getPatronNoteText();
186 bo.versionNumber = im.getVersionNumber();
187 return bo;
188 }
189
190
191
192
193
194
195 @Override
196 public String getId() {
197 return this.getPatronNoteId();
198 }
199
200 }