1 package org.kuali.ole.patron.bo;
2
3 import org.apache.commons.collections.CollectionUtils;
4 import org.kuali.ole.patron.api.OlePatronAffiliationDefinition;
5 import org.kuali.ole.patron.api.OleProxyPatronContract;
6 import org.kuali.ole.patron.api.OleProxyPatronDefinition;
7 import org.kuali.rice.kim.api.identity.employment.EntityEmployment;
8 import org.kuali.rice.kim.impl.identity.affiliation.EntityAffiliationTypeBo;
9 import org.kuali.rice.kim.impl.identity.employment.EntityEmploymentBo;
10 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
11
12 import java.util.Date;
13
14
15
16
17 public class OleProxyPatronDocument extends PersistableBusinessObjectBase implements OleProxyPatronContract{
18
19 private String oleProxyPatronDocumentId;
20 private String proxyPatronId;
21 private String olePatronId;
22 private Date proxyPatronExpirationDate;
23 private Date proxyPatronActivationDate;
24 private boolean active;
25
26 private String proxyBarcode;
27 private String proxyFirstName;
28 private String proxyLastName;
29
30 private OlePatronDocument olePatronDocument;
31
32
33
34
35
36 public String getProxyBarcode() {
37 return proxyBarcode;
38 }
39
40
41
42
43 public void setProxyBarcode(String proxyBarcode) {
44 this.proxyBarcode = proxyBarcode;
45 }
46
47
48
49
50 public String getProxyFirstName() {
51 return proxyFirstName;
52 }
53
54
55
56
57 public void setProxyFirstName(String proxyFirstName) {
58 this.proxyFirstName = proxyFirstName;
59 }
60
61
62
63
64 public String getProxyLastName() {
65 return proxyLastName;
66 }
67
68
69
70
71 public void setProxyLastName(String proxyLastName) {
72 this.proxyLastName = proxyLastName;
73 }
74
75
76
77
78 public String getOleProxyPatronDocumentId() {
79 return oleProxyPatronDocumentId;
80 }
81
82
83
84
85 public void setOleProxyPatronDocumentId(String oleProxyPatronDocumentId) {
86 this.oleProxyPatronDocumentId = oleProxyPatronDocumentId;
87 }
88
89
90
91
92 public String getProxyPatronId() {
93 return proxyPatronId;
94 }
95
96
97
98
99 public void setProxyPatronId(String proxyPatronId) {
100 this.proxyPatronId = proxyPatronId;
101 }
102
103
104
105
106 public String getOlePatronId() {
107 return olePatronId;
108 }
109
110
111
112
113 public void setOlePatronId(String olePatronId) {
114 this.olePatronId = olePatronId;
115 }
116
117
118
119
120
121
122
123
124
125
126
127
128 public OlePatronDocument getOlePatronDocument() {
129 return olePatronDocument;
130 }
131
132
133
134
135 public void setOlePatronDocument(OlePatronDocument olePatronDocument) {
136 this.olePatronDocument = olePatronDocument;
137 }
138
139
140
141
142 public Date getProxyPatronExpirationDate() {
143 return proxyPatronExpirationDate;
144 }
145
146
147
148
149 public void setProxyPatronExpirationDate(Date proxyPatronExpirationDate) {
150 this.proxyPatronExpirationDate = proxyPatronExpirationDate;
151 }
152
153
154
155
156 public Date getProxyPatronActivationDate() {
157 return proxyPatronActivationDate;
158 }
159
160
161
162
163 public void setProxyPatronActivationDate(Date proxyPatronActivationDate) {
164 this.proxyPatronActivationDate = proxyPatronActivationDate;
165 }
166
167
168
169
170 public boolean isActive() {
171 return active;
172 }
173
174
175
176
177 public void setActive(boolean active) {
178 this.active = active;
179 }
180
181
182
183
184
185
186 static OleProxyPatronDefinition to(OleProxyPatronDocument bo) {
187 if (bo == null) { return null; }
188 return OleProxyPatronDefinition.Builder.create(bo).build();
189 }
190
191
192
193
194
195
196 public static OleProxyPatronDocument from(OleProxyPatronDefinition im) {
197 if (im == null) { return null; }
198
199 OleProxyPatronDocument bo = new OleProxyPatronDocument();
200 bo.oleProxyPatronDocumentId= im.getOleProxyPatronDocumentId();
201 bo.olePatronId = im.getOlePatronId();
202 bo.proxyPatronId = im.getProxyPatronId();
203
204
205
206 bo.active = im.isActive();
207 bo.proxyPatronExpirationDate= im.getProxyPatronExpirationDate();
208 bo.proxyPatronActivationDate= im.getProxyPatronActivationDate();
209 bo.versionNumber = im.getVersionNumber();
210
211
212 return bo;
213 }
214
215
216 @Override
217 public String getId() {
218 return this.oleProxyPatronDocumentId;
219 }
220 }