View Javadoc
1   package org.kuali.ole.deliver.bo;
2   
3   import org.kuali.ole.deliver.api.OleProxyPatronContract;
4   import org.kuali.ole.deliver.api.OleProxyPatronDefinition;
5   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
6   
7   import java.util.Date;
8   
9   /**
10   * OleProxyPatronDocument provides OleProxyPatronDocument information through getter and setter.
11   */
12  public class OleProxyPatronDocument extends PersistableBusinessObjectBase implements OleProxyPatronContract {
13  
14      private String oleProxyPatronDocumentId;
15      private String proxyPatronId;
16      private String olePatronId;
17      private Date proxyPatronExpirationDate;
18      private Date proxyPatronActivationDate;
19      private boolean active;
20  
21      private String proxyPatronBarcode;
22      private String proxyPatronFirstName;
23      private String proxyPatronLastName;
24      private String proxyForPatronFirstName;
25      private String proxyForPatronLastName;
26      //private OlePatronDocument proxyPatron;
27      private OlePatronDocument olePatronDocument;
28  
29      /**
30       * Gets the value of proxyPatronBarcode property
31       *
32       * @return proxyPatronBarcode
33       */
34      public String getProxyPatronBarcode() {
35          return proxyPatronBarcode;
36      }
37  
38      /**
39       * Sets the value for proxyPatronBarcode property
40       *
41       * @param proxyPatronBarcode
42       */
43      public void setProxyPatronBarcode(String proxyPatronBarcode) {
44          this.proxyPatronBarcode = proxyPatronBarcode;
45      }
46  
47      /**
48       * Gets the value of proxyPatronFirstName property
49       *
50       * @return proxyPatronFirstName
51       */
52      public String getProxyPatronFirstName() {
53          return proxyPatronFirstName;
54      }
55  
56      /**
57       * Sets the value for proxyPatronFirstName property
58       *
59       * @param proxyPatronFirstName
60       */
61      public void setProxyPatronFirstName(String proxyPatronFirstName) {
62          this.proxyPatronFirstName = proxyPatronFirstName;
63      }
64  
65      /**
66       * Gets the value of proxyPatronLastName property
67       *
68       * @return proxyPatronLastName
69       */
70      public String getProxyPatronLastName() {
71          return proxyPatronLastName;
72      }
73  
74      /**
75       * Sets the value for proxyPatronLastName property
76       *
77       * @param proxyPatronLastName
78       */
79      public void setProxyPatronLastName(String proxyPatronLastName) {
80          this.proxyPatronLastName = proxyPatronLastName;
81      }
82  
83      /**
84       * Gets the value of oleProxyPatronDocumentId property
85       *
86       * @return oleProxyPatronDocumentId
87       */
88      public String getOleProxyPatronDocumentId() {
89          return oleProxyPatronDocumentId;
90      }
91  
92      /**
93       * Sets the value for oleProxyPatronDocumentId property
94       *
95       * @param oleProxyPatronDocumentId
96       */
97      public void setOleProxyPatronDocumentId(String oleProxyPatronDocumentId) {
98          this.oleProxyPatronDocumentId = oleProxyPatronDocumentId;
99      }
100 
101     /**
102      * Gets the value of proxyPatronId property
103      *
104      * @return proxyPatronId
105      */
106     public String getProxyPatronId() {
107         return proxyPatronId;
108     }
109 
110     /**
111      * Sets the value for proxyPatronId property
112      *
113      * @param proxyPatronId
114      */
115     public void setProxyPatronId(String proxyPatronId) {
116         this.proxyPatronId = proxyPatronId;
117     }
118 
119     /**
120      * Gets the value of olePatronId property
121      *
122      * @return olePatronId
123      */
124     public String getOlePatronId() {
125         return olePatronId;
126     }
127 
128     /**
129      * Sets the value for olePatronId property
130      *
131      * @param olePatronId
132      */
133     public void setOlePatronId(String olePatronId) {
134         this.olePatronId = olePatronId;
135     }
136 
137    /* public OlePatronDocument getProxyPatron() {
138         return proxyPatron;
139     }
140 
141     public void setProxyPatron(OlePatronDocument proxyPatron) {
142         this.proxyPatron = proxyPatron;
143     }*/
144 
145     /**
146      * Gets the value of olePatronDocument property
147      *
148      * @return olePatronDocument
149      */
150     public OlePatronDocument getOlePatronDocument() {
151         return olePatronDocument;
152     }
153 
154     /**
155      * Sets the value for olePatronDocument property
156      *
157      * @param olePatronDocument
158      */
159     public void setOlePatronDocument(OlePatronDocument olePatronDocument) {
160         this.olePatronDocument = olePatronDocument;
161     }
162 
163     /**
164      * Gets the value of proxyPatronExpirationDate property
165      *
166      * @return proxyPatronExpirationDate
167      */
168     public Date getProxyPatronExpirationDate() {
169         return proxyPatronExpirationDate;
170     }
171 
172     /**
173      * Sets the value for proxyPatronExpirationDate property
174      *
175      * @param proxyPatronExpirationDate
176      */
177     public void setProxyPatronExpirationDate(Date proxyPatronExpirationDate) {
178         this.proxyPatronExpirationDate = proxyPatronExpirationDate;
179     }
180 
181     /**
182      * Gets the value of proxyPatronActivationDate property
183      *
184      * @return proxyPatronActivationDate
185      */
186     public Date getProxyPatronActivationDate() {
187         return proxyPatronActivationDate;
188     }
189 
190     /**
191      * Sets the value for proxyPatronActivationDate property
192      *
193      * @param proxyPatronActivationDate
194      */
195     public void setProxyPatronActivationDate(Date proxyPatronActivationDate) {
196         this.proxyPatronActivationDate = proxyPatronActivationDate;
197     }
198 
199     /**
200      * Gets the value of active property
201      *
202      * @return active
203      */
204     public boolean isActive() {
205         return active;
206     }
207 
208     /**
209      * Sets the value for active property
210      *
211      * @param active
212      */
213     public void setActive(boolean active) {
214         this.active = active;
215     }
216 
217     /**
218      * Gets the value of proxyForPatronFirstName property
219      *
220      * @return proxyForPatronFirstName
221      */
222     public String getProxyForPatronFirstName() {
223         return proxyForPatronFirstName;
224     }
225 
226     /**
227      * Sets the value for proxyForPatronFirstName property
228      *
229      * @param proxyForPatronFirstName
230      */
231     public void setProxyForPatronFirstName(String proxyForPatronFirstName) {
232         this.proxyForPatronFirstName = proxyForPatronFirstName;
233     }
234 
235     /**
236      * Gets the value of proxyForPatronLastName property
237      *
238      * @return proxyForPatronLastName
239      */
240     public String getProxyForPatronLastName() {
241         return proxyForPatronLastName;
242     }
243 
244     /**
245      * Sets the value for proxyForPatronLastName property
246      *
247      * @param proxyForPatronLastName
248      */
249     public void setProxyForPatronLastName(String proxyForPatronLastName) {
250         this.proxyForPatronLastName = proxyForPatronLastName;
251     }
252 
253     /**
254      * This method converts the PersistableBusinessObjectBase OleProxyPatronDocument into immutable object OleProxyPatronDefinition
255      *
256      * @param bo(OleProxyPatronDefinition)
257      * @return OleProxyPatronDefinition
258      */
259     static OleProxyPatronDefinition to(org.kuali.ole.deliver.bo.OleProxyPatronDocument bo) {
260         if (bo == null) {
261             return null;
262         }
263         return OleProxyPatronDefinition.Builder.create(bo).build();
264     }
265 
266     /**
267      * This method converts the immutable object OleProxyPatronDefinition into PersistableBusinessObjectBase OleProxyPatronDocument
268      *
269      * @param im(OleProxyPatronDefinition)
270      * @return bo(OlePatronAffiliation)
271      */
272     public static org.kuali.ole.deliver.bo.OleProxyPatronDocument from(OleProxyPatronDefinition im) {
273         if (im == null) {
274             return null;
275         }
276 
277         org.kuali.ole.deliver.bo.OleProxyPatronDocument bo = new org.kuali.ole.deliver.bo.OleProxyPatronDocument();
278         bo.oleProxyPatronDocumentId = im.getOleProxyPatronDocumentId();
279         bo.olePatronId = im.getOlePatronId();
280         bo.proxyPatronId = im.getProxyPatronId();
281        /* if (im.getOlePatronDocument() != null) {
282             bo.olePatronDocument = OlePatronDocument.from(im.getOlePatronDocument());
283         }*/
284         bo.active = im.isActive();
285         bo.proxyPatronExpirationDate = im.getProxyPatronExpirationDate();
286         bo.proxyPatronActivationDate = im.getProxyPatronActivationDate();
287         bo.versionNumber = im.getVersionNumber();
288 
289 
290         return bo;
291     }
292 
293 
294     @Override
295     public String getId() {
296         return this.oleProxyPatronDocumentId;
297     }
298 }