1 package org.kuali.ole.patron.bo;
2
3 import org.kuali.ole.patron.api.OlePatronNotesContract;
4 import org.kuali.ole.patron.api.OlePatronNotesDefinition;
5 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
6
7 import java.io.Serializable;
8 import java.util.LinkedHashMap;
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 public String getPatronNoteId() {
27 return patronNoteId;
28 }
29
30
31
32
33 public void setPatronNoteId(String patronNoteId) {
34 this.patronNoteId = patronNoteId;
35 }
36
37
38
39
40 public String getOlePatronId() {
41 return olePatronId;
42 }
43
44
45
46
47 public void setOlePatronId(String olePatronId) {
48 this.olePatronId = olePatronId;
49 }
50
51
52
53
54 public String getPatronNoteTypeId() {
55 return patronNoteTypeId;
56 }
57
58
59
60
61 public void setPatronNoteTypeId(String patronNoteTypeId) {
62 this.patronNoteTypeId = patronNoteTypeId;
63 }
64
65
66
67
68 public String getPatronNoteText() {
69 return patronNoteText;
70 }
71
72
73
74
75 public void setPatronNoteText(String patronNoteText) {
76 this.patronNoteText = patronNoteText;
77 }
78
79
80
81
82 public boolean isActive() {
83 return active;
84 }
85
86
87
88
89 public void setActive(boolean active) {
90 this.active = active;
91 }
92
93
94
95
96 public OlePatronNoteType getOlePatronNoteType() {
97 return olePatronNoteType;
98 }
99
100
101
102
103 public void setOlePatronNoteType(OlePatronNoteType olePatronNoteType) {
104 this.olePatronNoteType = olePatronNoteType;
105 }
106
107
108
109
110 public OlePatronDocument getOlePatron() {
111 return olePatron;
112 }
113
114
115
116
117 public void setOlePatron(OlePatronDocument olePatron) {
118 this.olePatron = olePatron;
119 }
120 protected LinkedHashMap toStringMapper() {
121 LinkedHashMap toStringMap = new LinkedHashMap();
122 toStringMap.put("patronNoteId", patronNoteId);
123 return toStringMap;
124 }
125
126
127
128
129
130 public static OlePatronNotesDefinition to(OlePatronNotes bo) {
131 if (bo == null) { return null; }
132 return OlePatronNotesDefinition.Builder.create(bo).build();
133 }
134
135
136
137
138
139 public static OlePatronNotes from(OlePatronNotesDefinition im) {
140 if (im == null) { return null; }
141
142 OlePatronNotes bo = new OlePatronNotes();
143 bo.patronNoteId = im.getPatronNoteId();
144 bo.olePatronId = im.getOlePatronId();
145
146 bo.olePatronNoteType = OlePatronNoteType.from(im.getOlePatronNoteType());
147 bo.patronNoteTypeId = im.getOlePatronNoteType().getPatronNoteTypeId();
148 bo.patronNoteText = im.getPatronNoteText();
149
150 return bo;
151 }
152
153
154
155
156 @Override
157 public String getId() {
158 return this.getPatronNoteId();
159 }
160
161 }