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