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