View Javadoc
1   package org.kuali.ole.deliver.bo;
2   
3   import org.apache.commons.lang3.StringUtils;
4   import org.kuali.ole.OLEConstants;
5   import org.kuali.ole.deliver.api.OleDeliverRequestContract;
6   import org.kuali.ole.deliver.api.OleDeliverRequestDefinition;
7   import org.kuali.ole.docstore.common.document.content.instance.Item;
8   import org.kuali.rice.kim.impl.identity.PersonImpl;
9   import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
10  import org.kuali.rice.krad.service.KRADServiceLocator;
11  
12  import java.sql.Date;
13  import java.sql.Timestamp;
14  import java.util.HashMap;
15  import java.util.List;
16  import java.util.Map;
17  
18  /**
19   * Created with IntelliJ IDEA.
20   * User: ?
21   * Date: 10/1/12
22   * Time: 12:13 PM
23   * To change this template use File | Settings | File Templates.
24   */
25  public class OleDeliverRequestBo extends PersistableBusinessObjectBase implements OleDeliverRequestContract {
26      private String requestId;
27      private String poLineItemNo;
28      private String borrowerId;
29      private String borrowerBarcode;
30      private Integer borrowerQueuePosition;
31      private String proxyBorrowerId;
32      private String proxyBorrowerBarcode;
33      private String loanTransactionRecordNumber;
34      private String requestTypeId;
35      private String contentDescription;
36      private String copyFormat;
37      private String pickUpLocationId;
38      private String operatorCreateId;
39      private String operatorModifiedId;
40      private String machineId;
41      private String circulationLocationId;
42      private Date createDate;
43      private Date modifiedDate;
44      private Date requestExpiryDate;
45      private Date onHoldNoticeSentDate;
46      private Date recallNoticeSentDate;
47      private String itemId;
48      private String itemTypeName;
49      private String itemUuid;
50  
51      private String selectRequest;
52      private String requestCreator;
53      private String requestTypeCode;
54      private String borrowerName;
55      private String firstName;
56      private String lastName;
57      private String proxyBorrowerName;
58      private String proxyBorrowerFirstName;
59      private String proxyBorrowerLastName;
60      private String operatorCreateName;
61      private String operatorModifierName;
62  
63      private String courtesyNotice;
64      private String title;
65      private String author;
66      private String shelvingLocation;
67      private String callNumber;
68      private String copyNumber;
69      private String volumeNumber;
70      private String patronName;
71      private String itemType;
72      private String itemStatus;
73      private String circulationLocationCode;
74      private String pickUpLocationCode;
75      private String inTransitCheckInNote;
76      private boolean requestFlag;
77      private boolean claimsReturnedFlag;
78      private String message;
79      private String chronology;
80      private String enumeration;
81  
82      private OleCirculationDesk oleCirculationLocation = new OleCirculationDesk();
83  
84      private OleCirculationDesk olePickUpLocation = new OleCirculationDesk();
85      private OlePatronDocument olePatron = new OlePatronDocument();
86      private OlePatronDocument oleProxyPatron = new OlePatronDocument();
87  
88      private PersonImpl operatorCreator = new PersonImpl();
89      private PersonImpl operatorModifier = new PersonImpl();
90      private OleDeliverRequestType oleDeliverRequestType = new OleDeliverRequestType();
91  
92      private String roleName = OLEConstants.OleCirculationDeskDetail.OPERATOR_ROLE_NAME;
93      private String roleNamespaceCode = OLEConstants.OleCirculationDeskDetail.OPERATOR_ROLE_NAMESPACE;
94      private Date date;
95      private OleItemSearch oleItemSearch = new OleItemSearch();
96      private transient Item oleItem;
97  
98      private String itemInstitution;
99      private String itemCampus;
100     private String itemLibrary;
101     private String itemCollection;
102     private String itemLocation;
103     private String noticeType;
104     private Date newDueDate;
105     private Date originalDueDate;
106     private String requestStatus;
107     private boolean asrFlag;
108     private boolean isASRItem;
109     private boolean isValidToProcess;
110     private String bibId;
111     private String requestLevel;
112     private Date holdExpirationDate;
113     private List<OLEDeliverNotice> deliverNotices;
114 
115     public String getItemInstitution() {
116         return itemInstitution;
117     }
118 
119     public void setItemInstitution(String itemInstitution) {
120         this.itemInstitution = itemInstitution;
121     }
122 
123     public String getItemCampus() {
124         return itemCampus;
125     }
126 
127     public void setItemCampus(String itemCampus) {
128         this.itemCampus = itemCampus;
129     }
130 
131     public String getItemLibrary() {
132         return itemLibrary;
133     }
134 
135     public void setItemLibrary(String itemLibrary) {
136         this.itemLibrary = itemLibrary;
137     }
138 
139     public String getItemCollection() {
140         return itemCollection;
141     }
142 
143     public void setItemCollection(String itemCollection) {
144         this.itemCollection = itemCollection;
145     }
146 
147     public String getItemLocation() {
148         return itemLocation;
149     }
150 
151     public boolean isClaimsReturnedFlag() {
152         return claimsReturnedFlag;
153     }
154 
155     public void setClaimsReturnedFlag(boolean claimsReturnedFlag) {
156         this.claimsReturnedFlag = claimsReturnedFlag;
157     }
158 
159     public void setItemLocation(String itemLocation) {
160         this.itemLocation = itemLocation;
161     }
162 
163     public String getItemUuid() {
164         return itemUuid;
165     }
166 
167     public void setItemUuid(String itemUuid) {
168         this.itemUuid = itemUuid;
169     }
170 
171     public String getProxyBorrowerFirstName() {
172         return proxyBorrowerFirstName;
173     }
174 
175     public void setProxyBorrowerFirstName(String proxyBorrowerFirstName) {
176         this.proxyBorrowerFirstName = proxyBorrowerFirstName;
177     }
178 
179     private Timestamp recallDueDate;
180 
181 
182     public Timestamp getRecallDueDate() {
183         return recallDueDate;
184     }
185 
186     public void setRecallDueDate(Timestamp recallDueDate) {
187         this.recallDueDate = recallDueDate;
188     }
189 
190     public Item getOleItem() {
191         return oleItem;
192     }
193 
194     public String getProxyBorrowerLastName() {
195         return proxyBorrowerLastName;
196     }
197 
198     public void setProxyBorrowerLastName(String proxyBorrowerLastName) {
199         this.proxyBorrowerLastName = proxyBorrowerLastName;
200     }
201 
202     public void setOleItem(Item oleItem) {
203         this.oleItem = oleItem;
204     }
205 
206     public String getItemStatus() {
207         return itemStatus;
208     }
209 
210     public void setItemStatus(String itemStatus) {
211         this.itemStatus = itemStatus;
212     }
213 
214     public String getItemTypeName() {
215         return itemTypeName;
216     }
217 
218     public void setItemTypeName(String itemTypeName) {
219         this.itemTypeName = itemTypeName;
220     }
221 
222     public String getCirculationLocationCode() {
223         if (circulationLocationId != null && circulationLocationCode == null && oleCirculationLocation.getCirculationDeskId() != null) {
224             circulationLocationCode = oleCirculationLocation.getCirculationDeskCode();
225         }
226         return circulationLocationCode;
227     }
228 
229     public void setCirculationLocationCode(String circulationLocationCode) {
230         this.circulationLocationCode = circulationLocationCode;
231     }
232 
233     public String getPickUpLocationCode() {
234         if (pickUpLocationId != null && pickUpLocationCode == null && olePickUpLocation.getCirculationDeskId() != null) {
235             pickUpLocationCode = olePickUpLocation.getCirculationDeskCode();
236         }
237         return pickUpLocationCode;
238     }
239 
240     public void setPickUpLocationCode(String pickUpLocationCode) {
241         this.pickUpLocationCode = pickUpLocationCode;
242     }
243 
244     /**
245      * Gets the itemType attribute.
246      *
247      * @return Returns the itemType
248      */
249     public String getItemType() {
250         return itemType;
251     }
252 
253     /**
254      * Sets the itemType attribute value.
255      *
256      * @param itemType The itemType to set.
257      */
258     public void setItemType(String itemType) {
259         this.itemType = itemType;
260     }
261 
262 
263     public OleItemSearch getOleItemSearch() {
264         return oleItemSearch;
265     }
266 
267     public void setOleItemSearch(OleItemSearch oleItemSearch) {
268         this.oleItemSearch = oleItemSearch;
269     }
270 
271 
272     public String getRoleName() {
273         return roleName;
274     }
275 
276     public void setRoleName(String roleName) {
277         this.roleName = roleName;
278     }
279 
280     public String getRoleNamespaceCode() {
281         return roleNamespaceCode;
282     }
283 
284     public void setRoleNamespaceCode(String roleNamespaceCode) {
285         this.roleNamespaceCode = roleNamespaceCode;
286     }
287 
288     /**
289      * Gets the requestId attribute.
290      *
291      * @return Returns the requestId
292      */
293     public String getRequestId() {
294         return requestId;
295     }
296 
297     public void setRequestId(String requestId) {
298         this.requestId = requestId;
299     }
300 
301     /**
302      * Gets the poLineItemNo attribute.
303      *
304      * @return Returns the poLineItemNo
305      */
306     public String getPoLineItemNo() {
307         return poLineItemNo;
308     }
309 
310     public void setPoLineItemNo(String poLineItemNo) {
311         this.poLineItemNo = poLineItemNo;
312     }
313 
314     /**
315      * Gets the borrowerId attribute.
316      *
317      * @return Returns the borrowerId
318      */
319     public String getBorrowerId() {
320         return borrowerId;
321     }
322 
323     public void setBorrowerId(String borrowerId) {
324         this.borrowerId = borrowerId;
325     }
326 
327     /**
328      * Gets the borrowerQueuePosition attribute.
329      *
330      * @return Returns the borrowerQueuePosition
331      */
332     public Integer getBorrowerQueuePosition() {
333         return borrowerQueuePosition;
334     }
335 
336     public void setBorrowerQueuePosition(Integer borrowerQueuePosition) {
337         this.borrowerQueuePosition = borrowerQueuePosition;
338     }
339 
340     /**
341      * Gets the proxyBorrowerId attribute.
342      *
343      * @return Returns the proxyBorrowerId
344      */
345     public String getProxyBorrowerId() {
346         return proxyBorrowerId;
347     }
348 
349     public void setProxyBorrowerId(String proxyBorrowerId) {
350         if (proxyBorrowerId != null && proxyBorrowerId.equals(""))
351             this.proxyBorrowerId = null;
352         else
353             this.proxyBorrowerId = proxyBorrowerId;
354     }
355 
356     /**
357      * Gets the loanTransactionRecordNumber attribute.
358      *
359      * @return Returns the loanTransactionRecordNumber
360      */
361     public String getLoanTransactionRecordNumber() {
362         return loanTransactionRecordNumber;
363     }
364 
365     public void setLoanTransactionRecordNumber(String loanTransactionRecordNumber) {
366         this.loanTransactionRecordNumber = loanTransactionRecordNumber;
367     }
368 
369     /**
370      * Gets the requestTypeId attribute.
371      *
372      * @return Returns the requestTypeId
373      */
374     public String getRequestTypeId() {
375         return requestTypeId;
376     }
377 
378     public void setRequestTypeId(String requestTypeId) {
379 
380         this.requestTypeId = requestTypeId;
381     }
382 
383     /**
384      * Gets the contentDescription attribute.
385      *
386      * @return Returns the contentDescription
387      */
388     public String getContentDescription() {
389         return contentDescription;
390     }
391 
392     public void setContentDescription(String contentDescription) {
393         this.contentDescription = contentDescription;
394     }
395 
396     /**
397      * Gets the copyFormat attribute.
398      *
399      * @return Returns the copyFormat
400      */
401     public String getCopyFormat() {
402         return copyFormat;
403     }
404 
405     public void setCopyFormat(String copyFormat) {
406         this.copyFormat = copyFormat;
407     }
408 
409     /**
410      * Gets the pickUpLocationId attribute.
411      *
412      * @return Returns the pickUpLocationId
413      */
414     public String getPickUpLocationId() {
415         return pickUpLocationId;
416     }
417 
418     public void setPickUpLocationId(String pickUpLocationId) {
419         if (pickUpLocationId != null && pickUpLocationId.equals(""))
420             this.pickUpLocationId = null;
421         else
422             this.pickUpLocationId = pickUpLocationId;
423     }
424 
425     /**
426      * Gets the operatorCreateId attribute.
427      *
428      * @return Returns the operatorCreateId
429      */
430     public String getOperatorCreateId() {
431         return operatorCreateId;
432     }
433 
434     public void setOperatorCreateId(String operatorCreateId) {
435         this.operatorCreateId = operatorCreateId;
436     }
437 
438     /**
439      * Gets the operatorModifiedId attribute.
440      *
441      * @return Returns the operatorModifiedId
442      */
443     public String getOperatorModifiedId() {
444         return operatorModifiedId;
445     }
446 
447     public void setOperatorModifiedId(String operatorModifiedId) {
448         this.operatorModifiedId = operatorModifiedId;
449     }
450 
451     /**
452      * Gets the machineId attribute.
453      *
454      * @return Returns the machineId
455      */
456     public String getMachineId() {
457         return machineId;
458     }
459 
460     public void setMachineId(String machineId) {
461         this.machineId = machineId;
462     }
463 
464     /**
465      * Gets the circulationLocationId attribute.
466      *
467      * @return Returns the circulationLocationId
468      */
469     public String getCirculationLocationId() {
470         return circulationLocationId;
471     }
472 
473     public void setCirculationLocationId(String circulationLocationId) {
474         if (circulationLocationId != null && circulationLocationId.equals(""))
475             this.circulationLocationId = null;
476         else
477             this.circulationLocationId = circulationLocationId;
478     }
479 
480     public Date getCreateDate() {
481         return createDate;
482     }
483 
484     public void setCreateDate(Date createDate) {
485         this.createDate = createDate;
486     }
487 
488     public Date getModifiedDate() {
489         return modifiedDate;
490     }
491 
492     public void setModifiedDate(Date modifiedDate) {
493         this.modifiedDate = modifiedDate;
494     }
495 
496     public Date getRequestExpiryDate() {
497         return requestExpiryDate;
498     }
499 
500     public void setRequestExpiryDate(Date requestExpiryDate) {
501         this.requestExpiryDate = requestExpiryDate;
502     }
503 
504     public Date getOnHoldNoticeSentDate() {
505         return onHoldNoticeSentDate;
506     }
507 
508     public void setOnHoldNoticeSentDate(Date onHoldNoticeSentDate) {
509         this.onHoldNoticeSentDate = onHoldNoticeSentDate;
510     }
511 
512     public Date getRecallNoticeSentDate() {
513         return recallNoticeSentDate;
514     }
515 
516     public void setRecallNoticeSentDate(Date recallNoticeSentDate) {
517         this.recallNoticeSentDate = recallNoticeSentDate;
518     }
519 
520     /**
521      * Gets the itemId attribute.
522      *
523      * @return Returns the itemId
524      */
525     public String getItemId() {
526         return itemId;
527     }
528 
529     public void setItemId(String itemId) {
530         this.itemId = itemId;
531     }
532 
533     /**
534      * Gets the selectRequest attribute.
535      *
536      * @return Returns the selectRequest
537      */
538     public String getSelectRequest() {
539         return selectRequest;
540     }
541 
542     public void setSelectRequest(String selectRequest) {
543         this.selectRequest = selectRequest;
544     }
545 
546     /**
547      * Gets the requestCreator attribute.
548      *
549      * @return Returns the requestCreator
550      */
551     public String getRequestCreator() {
552         return requestCreator;
553     }
554 
555     public void setRequestCreator(String requestCreator) {
556         this.requestCreator = requestCreator;
557     }
558 
559     /**
560      * Gets the requestTypeCode attribute.
561      *
562      * @return Returns the requestTypeCode
563      */
564     public String getRequestTypeCode() {
565         if (requestTypeId != null && oleDeliverRequestType.getRequestTypeId() != null) {
566             return oleDeliverRequestType.getRequestTypeCode();
567         }
568         return requestTypeCode;
569     }
570 
571     public void setRequestTypeCode(String requestTypeCode) {
572         this.requestTypeCode = requestTypeCode;
573     }
574 
575     public String getFirstName() {
576         if (firstName == null && borrowerId != null && olePatron.getBarcode() != null && (borrowerId.equals(olePatron.getOlePatronId()))) {
577             return olePatron.getEntity().getNames().get(0).getFirstName();
578         }
579         return firstName;
580     }
581 
582     public void setFirstName(String firstName) {
583         this.firstName = firstName;
584     }
585 
586     public String getLastName() {
587         if (lastName == null && borrowerId != null && olePatron.getBarcode() != null && (borrowerId.equals(olePatron.getOlePatronId()))) {
588             return olePatron.getEntity().getNames().get(0).getLastName();
589         }
590         return lastName;
591     }
592 
593     public void setLastName(String lastName) {
594         this.lastName = lastName;
595     }
596 
597     /**
598      * Gets the borrowerName attribute.
599      *
600      * @return Returns the borrowerName
601      */
602     public String getBorrowerName() {
603         if (borrowerName == null && borrowerId != null && olePatron.getBarcode() != null && (borrowerId.equals(olePatron.getOlePatronId()))) {
604             return olePatron.getEntity().getNames().get(0).getFirstName() + " " + olePatron.getEntity().getNames().get(0).getLastName();
605         }
606         return borrowerName;
607     }
608 
609     public void setBorrowerName(String borrowerName) {
610         this.borrowerName = borrowerName;
611     }
612 
613     /**
614      * Gets the proxyBorrowerName attribute.
615      *
616      * @return Returns the proxyBorrowerName
617      */
618     public String getProxyBorrowerName() {
619         if (proxyBorrowerName == null && proxyBorrowerId != null && oleProxyPatron.getBarcode() != null && (proxyBorrowerId.equals(oleProxyPatron.getOlePatronId()))) {
620             return oleProxyPatron.getEntity().getNames().get(0).getFirstName() + " " + oleProxyPatron.getEntity().getNames().get(0).getLastName();
621         }
622         return proxyBorrowerName;
623     }
624 
625     public void setProxyBorrowerName(String proxyBorrowerName) {
626         this.proxyBorrowerName = proxyBorrowerName;
627     }
628 
629     /**
630      * Gets the operatorCreateName attribute.
631      *
632      * @return Returns the operatorCreateName
633      */
634     public String getOperatorCreateName() {
635         return operatorCreateName;
636     }
637 
638     public void setOperatorCreateName(String operatorCreateName) {
639         this.operatorCreateName = operatorCreateName;
640     }
641 
642     /**
643      * Gets the courtesyNotice attribute.
644      *
645      * @return Returns the courtesyNotice
646      */
647     public String getCourtesyNotice() {
648         return courtesyNotice;
649     }
650 
651     public void setCourtesyNotice(String courtesyNotice) {
652         this.courtesyNotice = courtesyNotice;
653     }
654 
655     /**
656      * Gets the title attribute.
657      *
658      * @return Returns the title
659      */
660     public String getTitle() {
661         return title;
662     }
663 
664     public void setTitle(String title) {
665         this.title = title;
666     }
667 
668     /**
669      * Gets the author attribute.
670      *
671      * @return Returns the author
672      */
673     public String getAuthor() {
674         return author;
675     }
676 
677     public void setAuthor(String author) {
678         this.author = author;
679     }
680 
681     /**
682      * Gets the shelvingLocation attribute.
683      *
684      * @return Returns the shelvingLocation
685      */
686     public String getShelvingLocation() {
687         return shelvingLocation;
688     }
689 
690     public void setShelvingLocation(String shelvingLocation) {
691         this.shelvingLocation = shelvingLocation;
692     }
693 
694     /**
695      * Gets the callNumber attribute.
696      *
697      * @return Returns the callNumber
698      */
699     public String getCallNumber() {
700         return callNumber;
701     }
702 
703     public void setCallNumber(String callNumber) {
704         this.callNumber = callNumber;
705     }
706 
707     /**
708      * Gets the copyNumber attribute.
709      *
710      * @return Returns the copyNumber
711      */
712     public String getCopyNumber() {
713         return copyNumber;
714     }
715 
716     public void setCopyNumber(String copyNumber) {
717         this.copyNumber = copyNumber;
718     }
719 
720     /**
721      * Gets the patronName attribute.
722      *
723      * @return Returns the patronName
724      */
725     public String getPatronName() {
726         return patronName;
727     }
728 
729     public void setPatronName(String patronName) {
730         this.patronName = patronName;
731     }
732 
733     public Date getDate() {
734         return date;
735     }
736 
737     public void setDate(Date date) {
738         this.date = date;
739     }
740 
741     public OleCirculationDesk getOleCirculationLocation() {
742         return oleCirculationLocation;
743     }
744 
745     public void setOleCirculationLocation(OleCirculationDesk oleCirculationLocation) {
746         this.oleCirculationLocation = oleCirculationLocation;
747     }
748 
749     public OleCirculationDesk getOlePickUpLocation() {
750         return olePickUpLocation;
751     }
752 
753     public void setOlePickUpLocation(OleCirculationDesk olePickUpLocation) {
754         this.olePickUpLocation = olePickUpLocation;
755     }
756 
757     public OlePatronDocument getOlePatron() {
758         if (null == olePatron || StringUtils.isEmpty(olePatron.getOlePatronId())) {
759             String patronId = getBorrowerId();
760             if (StringUtils.isNotEmpty(patronId)) {
761                 Map<String, String> parameterMap = new HashMap<>();
762                 parameterMap.put("olePatronId", patronId);
763                 Long startingTime = System.currentTimeMillis();
764                 olePatron = KRADServiceLocator.getBusinessObjectService().findByPrimaryKey(OlePatronDocument.class, parameterMap);
765                 Long endTimme = System.currentTimeMillis();
766                 Long timeTaken = endTimme-startingTime;
767                 System.out.println("The Time Taken for Fetching PatronObject : " + timeTaken);
768             }
769         }
770         return olePatron;
771     }
772 
773     public void setOlePatron(OlePatronDocument olePatron) {
774         this.olePatron = olePatron;
775     }
776 
777     public OlePatronDocument getOleProxyPatron() {
778         if (null == oleProxyPatron) {
779             String patronId = getProxyBorrowerId();
780             if (StringUtils.isNotEmpty(patronId)) {
781                 Map<String, String> parameterMap = new HashMap<>();
782                 parameterMap.put("olePatronId", patronId);
783                 oleProxyPatron = KRADServiceLocator.getBusinessObjectService().findByPrimaryKey(OlePatronDocument.class, parameterMap);
784             }
785         }
786         return oleProxyPatron;
787     }
788 
789     public void setOleProxyPatron(OlePatronDocument oleProxyPatron) {
790         this.oleProxyPatron = oleProxyPatron;
791     }
792 
793     public PersonImpl getOperatorCreator() {
794         return operatorCreator;
795     }
796 
797     public void setOperatorCreator(PersonImpl operatorCreator) {
798         this.operatorCreator = operatorCreator;
799     }
800 
801     public PersonImpl getOperatorModifier() {
802         return operatorModifier;
803     }
804 
805     public void setOperatorModifier(PersonImpl operatorModifier) {
806         this.operatorModifier = operatorModifier;
807     }
808 
809     public OleDeliverRequestType getOleDeliverRequestType() {
810         return oleDeliverRequestType;
811     }
812 
813     public void setOleDeliverRequestType(OleDeliverRequestType oleDeliverRequestType) {
814         this.oleDeliverRequestType = oleDeliverRequestType;
815     }
816 
817     public String getOperatorModifierName() {
818         return operatorModifierName;
819     }
820 
821     public void setOperatorModifierName(String operatorModifierName) {
822         this.operatorModifierName = operatorModifierName;
823     }
824 
825     public String getInTransitCheckInNote() {
826         return inTransitCheckInNote;
827     }
828 
829     public void setInTransitCheckInNote(String inTransitCheckInNote) {
830         this.inTransitCheckInNote = inTransitCheckInNote;
831     }
832 
833     public boolean isRequestFlag() {
834         return requestFlag;
835     }
836 
837     public void setRequestFlag(boolean requestFlag) {
838         this.requestFlag = requestFlag;
839     }
840 
841     public String getVolumeNumber() {
842         return volumeNumber;
843     }
844 
845     public void setVolumeNumber(String volumeNumber) {
846         this.volumeNumber = volumeNumber;
847     }
848 
849     /**
850      * This method converts the PersistableBusinessObjectBase OleDeliverRequestBo into immutable object OleDeliverRequestDefinition
851      *
852      * @param bo
853      * @return OleDeliverRequestDefinition
854      */
855     public static OleDeliverRequestDefinition to(OleDeliverRequestBo bo) {
856         if (bo == null) {
857             return null;
858         }
859         return OleDeliverRequestDefinition.Builder.create(bo).build();
860     }
861 
862     /**
863      * This method converts the immutable object OleDeliverRequestDefinition into PersistableBusinessObjectBase OleDeliverRequestBo
864      *
865      * @param imOleDeliverRequestDefinition
866      * @return bo
867      */
868     public static OleDeliverRequestBo from(OleDeliverRequestDefinition imOleDeliverRequestDefinition) {
869         if (imOleDeliverRequestDefinition == null) {
870             return null;
871         }
872 
873         OleDeliverRequestBo bo = new OleDeliverRequestBo();
874         bo.itemId = imOleDeliverRequestDefinition.getItemId();
875         bo.requestId = imOleDeliverRequestDefinition.getRequestId();
876         bo.title = imOleDeliverRequestDefinition.getTitle();
877         bo.author = imOleDeliverRequestDefinition.getAuthor();
878         bo.callNumber = imOleDeliverRequestDefinition.getCallNumber();
879         bo.copyNumber = imOleDeliverRequestDefinition.getCopyNumber();
880         bo.itemStatus = imOleDeliverRequestDefinition.getItemStatus();
881         bo.itemType = imOleDeliverRequestDefinition.getItemType();
882         bo.borrowerQueuePosition = imOleDeliverRequestDefinition.getBorrowerQueuePosition();
883         bo.volumeNumber = imOleDeliverRequestDefinition.getVolumeNumber();
884         bo.shelvingLocation = imOleDeliverRequestDefinition.getShelvingLocation();
885         bo.oleDeliverRequestType = OleDeliverRequestType.from(imOleDeliverRequestDefinition.getOleDeliverRequestType());
886         bo.versionNumber = imOleDeliverRequestDefinition.getVersionNumber();
887 
888         return bo;
889     }
890 
891     @Override
892     public String getId() {
893         return this.requestId;
894     }
895 
896     public String getMessage() {
897         return message;
898     }
899 
900     public void setMessage(String message) {
901         this.message = message;
902     }
903 
904     public void setNoticeType(String noticeType) {
905         this.noticeType = noticeType;
906     }
907 
908     public String getNoticeType() {
909         return noticeType;
910     }
911 
912     public String getBorrowerBarcode() {
913         return borrowerBarcode;
914     }
915 
916     public void setBorrowerBarcode(String borrowerBarcode) {
917         this.borrowerBarcode = borrowerBarcode;
918     }
919 
920     public String getProxyBorrowerBarcode() {
921         return proxyBorrowerBarcode;
922     }
923 
924     public void setProxyBorrowerBarcode(String proxyBorrowerBarcode) {
925         this.proxyBorrowerBarcode = proxyBorrowerBarcode;
926     }
927 
928     public Date getNewDueDate() {
929         return newDueDate;
930     }
931 
932     public void setNewDueDate(Date newDueDate) {
933         this.newDueDate = newDueDate;
934     }
935 
936     public Date getOriginalDueDate() {
937         return originalDueDate;
938     }
939 
940     public void setOriginalDueDate(Date originalDueDate) {
941         this.originalDueDate = originalDueDate;
942     }
943 
944     public String getRequestStatus() {
945         return requestStatus;
946     }
947 
948     public void setRequestStatus(String requestStatus) {
949         this.requestStatus = requestStatus;
950     }
951 
952     public boolean isAsrFlag() {
953         return asrFlag;
954     }
955 
956     public void setAsrFlag(boolean asrFlag) {
957         this.asrFlag = asrFlag;
958     }
959 
960     public boolean isASRItem() {
961         return isASRItem;
962     }
963 
964     public void setASRItem(boolean ASRItem) {
965         isASRItem = ASRItem;
966     }
967 
968     public boolean isValidToProcess() {
969         return isValidToProcess;
970     }
971 
972     public void setValidToProcess(boolean isValidToProcess) {
973         this.isValidToProcess = isValidToProcess;
974     }
975 
976     public String getChronology() {
977         return chronology;
978     }
979 
980     public void setChronology(String chronology) {
981         this.chronology = chronology;
982     }
983 
984     public String getEnumeration() {
985         return enumeration;
986     }
987 
988     public void setEnumeration(String enumeration) {
989         this.enumeration = enumeration;
990     }
991 
992     public String getBibId() {
993         return bibId;
994     }
995 
996     public void setBibId(String bibId) {
997         this.bibId = bibId;
998     }
999 
1000     public String getRequestLevel() {
1001         return requestLevel;
1002     }
1003 
1004     public void setRequestLevel(String requestLevel) {
1005         this.requestLevel = requestLevel;
1006     }
1007 
1008     public Date getHoldExpirationDate() {
1009         return holdExpirationDate;
1010     }
1011 
1012     public void setHoldExpirationDate(Date holdExpirationDate) {
1013         this.holdExpirationDate = holdExpirationDate;
1014     }
1015 
1016     public List<OLEDeliverNotice> getDeliverNotices() {
1017         return deliverNotices;
1018     }
1019 
1020     public void setDeliverNotices(List<OLEDeliverNotice> deliverNotices) {
1021         this.deliverNotices = deliverNotices;
1022     }
1023 }