View Javadoc
1   /*
2    * Copyright 2011 The Kuali Foundation.
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.ole.select.businessobject;
17  
18  import org.kuali.ole.DocumentUniqueIDPrefix;
19  import org.kuali.ole.docstore.model.bo.WorkBibDocument;
20  import org.kuali.ole.docstore.model.bo.WorkInstanceDocument;
21  import org.kuali.ole.docstore.model.bo.WorkItemDocument;
22  import org.kuali.ole.docstore.model.enums.DocType;
23  import org.kuali.ole.module.purap.PurapConstants;
24  import org.kuali.ole.module.purap.businessobject.LineItemReceivingItem;
25  import org.kuali.ole.module.purap.businessobject.PurchaseOrderItem;
26  import org.kuali.ole.module.purap.document.LineItemReceivingDocument;
27  import org.kuali.ole.module.purap.document.PurchaseOrderDocument;
28  import org.kuali.ole.module.purap.exception.PurError;
29  import org.kuali.ole.pojo.OleOrderRecord;
30  import org.kuali.ole.select.bo.OLELinkPurapDonor;
31  import org.kuali.ole.select.document.OleLineItemReceivingDocument;
32  import org.kuali.ole.select.document.service.OleCopyHelperService;
33  import org.kuali.ole.select.document.service.OleDocstoreHelperService;
34  import org.kuali.ole.select.lookup.DocData;
35  import org.kuali.ole.sys.OLEConstants;
36  import org.kuali.ole.sys.context.SpringContext;
37  import org.kuali.rice.core.api.util.type.KualiDecimal;
38  import org.kuali.rice.core.api.util.type.KualiInteger;
39  import org.kuali.rice.krad.service.BusinessObjectService;
40  import org.kuali.rice.krad.util.ObjectUtils;
41  
42  import java.util.*;
43  
44  /**
45   * This class holds line item information pertaining to OLE Receiving.
46   */
47  
48  public class OleLineItemReceivingItem extends LineItemReceivingItem implements OleReceivingItem {
49      private KualiDecimal itemOrderedParts;
50      private KualiDecimal itemReceivedTotalParts;
51      private KualiDecimal itemReturnedTotalParts;
52      private KualiDecimal itemDamagedTotalParts;
53      // not stored in db
54      private KualiDecimal itemReceivedPriorParts;
55      private KualiDecimal itemReceivedToBeParts;
56      private Boolean availableToPublic = true;
57      private Integer oleFormatId;
58      protected KualiDecimal itemOriginalReceivedTotalParts;
59      protected KualiDecimal itemOriginalReturnedTotalParts;
60      protected KualiDecimal itemOriginalDamagedTotalParts;
61      protected String localTitleId;
62      // Changes for OLE-2061 Starts
63      private List<OleReceivingLineExceptionNotes> exceptionNoteList;
64      private Integer exceptionTypeId;
65      private String exceptionNotes;
66      // Changes for OLE-2061 Ends
67  
68      // Changes for OLE-2062 Starts
69      private List<OleLineItemReceivingReceiptNotes> noteList;
70      private List<OleLineItemReceivingReceiptNotes> receiptNoteList;
71      private Integer noteTypeId;
72      private String receiptNotes;
73      private String notes;
74      private Integer receiptNoteListSize;
75      // Changes for OLE-2062 Ends
76  
77      private List<OleLineItemReceivingReceiptNotes> specialHandlingNoteList;
78      private boolean notesAck = false;
79  
80      private String itemTitleId;
81      private BibInfoBean bibInfoBean;
82      private String bibUUID;
83      private DocData docData;
84      //private OleLineItemReceivingDoc oleLineItemReceivingItemDoc;
85      private List<OleLineItemReceivingDoc> oleLineItemReceivingItemDocList;
86      private BusinessObjectService businessObjectService;
87      private OleOrderRecord oleOrderRecord;
88      protected Integer receiptStatusId;
89      private OleReceiptStatus oleReceiptStatus;
90      private String donorCode;
91      private List<OLELinkPurapDonor> oleDonors=new ArrayList<>();
92      /**
93       * For List of copies
94       */
95      private Integer itemCopiesId;
96      private KualiInteger parts;
97      private KualiDecimal itemCopies;
98      private String partEnumeration;
99      private String locationCopies;
100     private KualiInteger startingCopyNumber;
101     private List<OleCopies> copies = new ArrayList<OleCopies>();
102 
103     /**
104      * For Quantity and Parts fields As Integer
105      */
106     private KualiInteger oleItemOrderedQuantity;
107     private KualiInteger oleItemReceivedPriorQuantity;
108     private KualiInteger oleItemReceivedToBeQuantity;
109     private KualiInteger oleItemReceivedTotalQuantity;
110     private KualiInteger oleItemReturnedTotalQuantity;
111     private KualiInteger oleItemDamagedTotalQuantity;
112     private KualiInteger oleItemOrderedParts;
113     private KualiInteger oleItemReceivedPriorParts;
114     private KualiInteger oleItemReceivedToBeParts;
115     private KualiInteger oleItemReceivedTotalParts;
116     private KualiInteger oleItemReturnedTotalParts;
117     private KualiInteger oleItemDamagedTotalParts;
118 
119     private String enumeration;
120     private String location;
121     private String copyNumber;
122     private String receiptStatus;
123     private List<OleCopy> copyList = new ArrayList<>();
124     private boolean poSelected;
125     private String docFormat;
126 
127 
128     public String getDocFormat() {
129         return docFormat;
130     }
131 
132     public void setDocFormat(String docFormat) {
133         this.docFormat = docFormat;
134     }
135 
136     public boolean isPoSelected() {
137         return poSelected;
138     }
139 
140     public void setPoSelected(boolean poSelected) {
141         this.poSelected = poSelected;
142     }
143 
144     public String getLocalTitleId() {
145         return localTitleId;
146     }
147 
148     public void setLocalTitleId(String localTitleId) {
149         this.localTitleId = localTitleId;
150     }
151 
152     /**
153      * Gets the value of the receiptStatusId property
154      *
155      * @return receiptStatusId
156      */
157     public Integer getReceiptStatusId() {
158         return receiptStatusId;
159     }
160 
161     /**
162      * Sets the receiptStatusId value
163      *
164      * @param receiptStatusId
165      */
166     public void setReceiptStatusId(Integer receiptStatusId) {
167         this.receiptStatusId = receiptStatusId;
168     }
169 
170     /**
171      * Gets the instance of OleReceiptStatus
172      *
173      * @return oleReceiptStatus
174      */
175     public OleReceiptStatus getOleReceiptStatus() {
176         return oleReceiptStatus;
177     }
178 
179     /**
180      * Sets the instance value for OleReceiptStatus
181      *
182      * @param oleReceiptStatus
183      */
184     public void setOleReceiptStatus(OleReceiptStatus oleReceiptStatus) {
185         this.oleReceiptStatus = oleReceiptStatus;
186     }
187 
188     public OleOrderRecord getOleOrderRecord() {
189         return oleOrderRecord;
190     }
191 
192     public void setOleOrderRecord(OleOrderRecord oleOrderRecord) {
193         this.oleOrderRecord = oleOrderRecord;
194     }
195 
196     public BusinessObjectService getBusinessObjectService() {
197         return businessObjectService;
198     }
199 
200     public void setBusinessObjectService(BusinessObjectService businessObjectService) {
201         this.businessObjectService = businessObjectService;
202     }
203 
204 /*    public OleLineItemReceivingDoc getOleLineItemReceivingItemDoc() {
205         return oleLineItemReceivingItemDoc;
206     }
207 
208     public void setOleLineItemReceivingItemDoc(OleLineItemReceivingDoc oleLineItemReceivingItemDoc) {
209         this.oleLineItemReceivingItemDoc = oleLineItemReceivingItemDoc;
210     }*/
211 
212     private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(OleLineItemReceivingItem.class);
213 
214     public List<OleLineItemReceivingDoc> getOleLineItemReceivingItemDocList() {
215         return oleLineItemReceivingItemDocList;
216     }
217 
218     public void setOleLineItemReceivingItemDocList(List<OleLineItemReceivingDoc> oleLineItemReceivingItemDocList) {
219         this.oleLineItemReceivingItemDocList = oleLineItemReceivingItemDocList;
220     }
221 
222     /**
223      * Default constructor.
224      */
225     public OleLineItemReceivingItem() {
226         this.setItemUnitOfMeasureCode(PurapConstants.LineItemReceivingDocumentStrings.CUSTOMER_INVOICE_DETAIL_UOM_DEFAULT);
227         this.setOleItemReceivedTotalQuantity(KualiInteger.ZERO);
228         this.setOleItemReturnedTotalQuantity(KualiInteger.ZERO);
229         this.setOleItemDamagedTotalQuantity(KualiInteger.ZERO);
230         this.setItemOriginalReceivedTotalQuantity(KualiDecimal.ZERO);
231         this.setItemOriginalReturnedTotalQuantity(KualiDecimal.ZERO);
232         this.setItemOriginalDamagedTotalQuantity(KualiDecimal.ZERO);
233         this.setItemReceivedTotalParts(KualiDecimal.ZERO);
234         this.setItemReturnedTotalParts(KualiDecimal.ZERO);
235         this.setItemDamagedTotalParts(KualiDecimal.ZERO);
236         this.setItemOriginalReceivedTotalParts(KualiDecimal.ZERO);
237         this.setItemOriginalReturnedTotalParts(KualiDecimal.ZERO);
238         this.setItemOriginalDamagedTotalParts(KualiDecimal.ZERO);
239         exceptionNoteList = new ArrayList();
240         receiptNoteList = new ArrayList();
241         specialHandlingNoteList = new ArrayList();
242         noteList = new ArrayList();
243         oleLineItemReceivingItemDocList = new ArrayList();
244     }
245 
246     /**
247      * Constructs a OleLineItemReceivingItem with default values for parts and quantity related attributes.
248      *
249      * @param rld
250      */
251     public OleLineItemReceivingItem(LineItemReceivingDocument rld) {
252         super(rld);
253         this.setItemReceivedTotalParts(KualiDecimal.ZERO);
254         this.setItemReturnedTotalParts(KualiDecimal.ZERO);
255         this.setItemDamagedTotalParts(KualiDecimal.ZERO);
256         this.setItemOriginalReceivedTotalParts(KualiDecimal.ZERO);
257         this.setItemOriginalReturnedTotalParts(KualiDecimal.ZERO);
258         this.setItemOriginalDamagedTotalParts(KualiDecimal.ZERO);
259 
260         exceptionNoteList = new ArrayList();
261         receiptNoteList = new ArrayList();
262         specialHandlingNoteList = new ArrayList();
263         noteList = new ArrayList();
264         oleLineItemReceivingItemDocList = new ArrayList();
265     }
266 
267     /**
268      * Constructs a OleLineItemReceivingItem with default values for parts and quantity related attributes.
269      * Also sets values for parts/quantity that were received and to be received.
270      *
271      * @param poi
272      * @param rld
273      */
274     public OleLineItemReceivingItem(PurchaseOrderItem poi, LineItemReceivingDocument rld) {
275         super(poi, rld);
276         OlePurchaseOrderItem olePoi = (OlePurchaseOrderItem) poi;
277         this.setReceiptStatusId(olePoi.getReceiptStatusId());
278         OleLineItemReceivingDocument oleLineItemRecvDoc = (OleLineItemReceivingDocument) rld;
279         if (this.getItemTitleId() == null) {
280             this.setItemTitleId(olePoi.getItemTitleId());
281         }
282         OleLineItemReceivingDoc oleLineItemReceivingDoc = new OleLineItemReceivingDoc();
283         oleLineItemReceivingDoc.setReceivingLineItemIdentifier(this.getReceivingItemIdentifier());
284         oleLineItemReceivingDoc.setItemTitleId(olePoi.getItemTitleId());
285         oleLineItemReceivingItemDocList = oleLineItemReceivingDoc.getItemTitleId() != null ? Collections.singletonList(oleLineItemReceivingDoc) : new ArrayList();
286         if (ObjectUtils.isNotNull(olePoi.getItemNoOfParts())) {
287             this.setItemOrderedParts((olePoi.getItemNoOfParts().kualiDecimalValue()));
288         } else {
289             this.setItemOrderedParts(new KualiDecimal(0));
290         }
291 
292         if (ObjectUtils.isNull(olePoi.getItemReceivedTotalParts())) {
293             this.setItemReceivedPriorParts(KualiDecimal.ZERO);
294         } else {
295             this.setItemReceivedPriorParts(olePoi.getItemReceivedTotalParts());
296         }
297 
298         this.setItemReceivedToBeParts(this.getItemOrderedParts().subtract(this.getItemReceivedPriorParts()));
299 
300         this.setItemReceivedTotalParts(KualiDecimal.ZERO);
301         this.setItemReturnedTotalParts(KualiDecimal.ZERO);
302         this.setItemDamagedTotalParts(KualiDecimal.ZERO);
303         this.setItemOriginalReceivedTotalParts(KualiDecimal.ZERO);
304         this.setItemOriginalReturnedTotalParts(KualiDecimal.ZERO);
305         this.setItemOriginalDamagedTotalParts(KualiDecimal.ZERO);
306         exceptionNoteList = new ArrayList();
307         receiptNoteList = new ArrayList();
308         specialHandlingNoteList = new ArrayList();
309         noteList = new ArrayList();
310         if (olePoi.getNotes() != null && olePoi.getNotes().size() > 0) {
311             List receiptNoteList = new ArrayList();
312             List specialHandlingNoteList = new ArrayList();
313             List noteList = new ArrayList();
314             for (OleNotes poNote : olePoi.getNotes()) {
315                 OleLineItemReceivingReceiptNotes receiptNote = new OleLineItemReceivingReceiptNotes(poNote);
316                 receiptNote.setReceivingLineItem(this);
317                 receiptNote.setNoteType(poNote.getNoteType());
318                 String note = receiptNote.getNoteType().getNoteType();
319                 if (note.equalsIgnoreCase(OLEConstants.SPECIAL_PROCESSING_INSTRUCTION_NOTE)) {
320                     specialHandlingNoteList.add(receiptNote);
321                 } else {
322                     receiptNoteList.add(receiptNote);
323                 }
324                 noteList.add(receiptNote);
325             }
326             this.setSpecialHandlingNoteList(specialHandlingNoteList);
327             this.setReceiptNoteList(receiptNoteList);
328             this.setReceiptNoteListSize(receiptNoteList.size());
329             this.setNoteList(noteList);
330         }
331         this.setPurchaseOrderIdentifier(poi.getItemIdentifier());
332         this.setOleFormatId(olePoi.getFormatTypeId());
333         this.setOleDonors(olePoi.getOleDonors());
334 
335         if(olePoi.getItemTitleId()!=null){
336             this.setDocFormat(DocumentUniqueIDPrefix.getBibFormatType(olePoi.getItemTitleId()));
337         }
338         /*List<WorkBibDocument> workBibDocuments = new ArrayList<WorkBibDocument>();
339         if (null != this.itemTitleId) {
340             List<String> itemTitleIdsList = new ArrayList<String>();
341 
342             itemTitleIdsList.add(this.itemTitleId);
343             workBibDocuments = getWorkBibDocuments(itemTitleIdsList);
344         }
345         if (null != this.itemTitleId && workBibDocuments.size() > 0) {
346             if (this.getItemOrderedQuantity().isGreaterThan(new KualiDecimal(1))
347                     || this.getItemOrderedParts().isGreaterThan(new KualiDecimal(1))) {
348                 for (WorkBibDocument workBibDocument : workBibDocuments) {
349                     List<OleCopies> copies = setCopiesToLineItem(workBibDocument);
350                     this.setCopies(copies);
351                 }
352             }
353           //  this.setItemReceivedTotalQuantity(this.getItemReceivedToBeQuantity());
354          //   this.setItemReceivedTotalParts(new KualiDecimal(this.getItemReceivedToBeParts().intValue()));
355         }*/
356         this.setCopies(olePoi.getCopies());
357         this.setCopyList(olePoi.getCopyList());
358         List<OleCopy> copyList = this.getCopyList() != null ? this.getCopyList() : new ArrayList<OleCopy>();
359         OleCopyHelperService oleCopyHelperService = SpringContext.getBean(OleCopyHelperService.class);
360 
361         HashMap<String, List<OleCopy>> copyListBasedOnCopyNumber = oleCopyHelperService.getCopyListBasedOnCopyNumber(copyList,olePoi.getItemNoOfParts().intValue());
362         Iterator<Map.Entry<String, List<OleCopy>>> entries = copyListBasedOnCopyNumber.entrySet().iterator();
363         Integer receivedCopyCount = 0;
364         while (entries.hasNext()) {
365             Map.Entry<String, List<OleCopy>> entry = entries.next();
366             List<OleCopy> copyMap = entry.getValue();
367             Integer copyCount = 0;
368             for (OleCopy copy : copyMap) {
369                 if (copy.getReceiptStatus()!=null && copy.getReceiptStatus().equalsIgnoreCase(OLEConstants.OleLineItemReceiving.RECEIVED_STATUS)) {
370                     copyCount++;
371                 }
372             }
373             if (copyCount == this.getItemOrderedParts().intValue()) {
374                 receivedCopyCount++;
375             }
376         }
377         if (receivedCopyCount > 0) {
378             this.setItemReceivedTotalQuantity(new KualiDecimal(receivedCopyCount));
379             this.setItemReceivedTotalParts(new KualiDecimal(this.getItemOrderedParts().intValue()));
380         }
381     }
382 
383     /**
384      * Gets the parts ordered attribute value.
385      *
386      * @return Returns the itemOrderedParts.
387      */
388     public KualiDecimal getItemOrderedParts() {
389         return itemOrderedParts;
390     }
391 
392     /**
393      * Sets the parts ordered attribute value.
394      *
395      * @param itemOrderedParts to set.
396      */
397     public void setItemOrderedParts(KualiDecimal itemOrderedParts) {
398         this.itemOrderedParts = itemOrderedParts;
399     }
400 
401     /**
402      * Gets the parts received attribute value.
403      *
404      * @return Returns the itemReceivedTotalParts.
405      */
406     @Override
407     public KualiDecimal getItemReceivedTotalParts() {
408         return itemReceivedTotalParts;
409     }
410 
411     /**
412      * Sets the parts received attribute value.
413      *
414      * @param itemReceivedTotalParts to set.
415      */
416     @Override
417     public void setItemReceivedTotalParts(KualiDecimal itemReceivedTotalParts) {
418         this.itemReceivedTotalParts = itemReceivedTotalParts;
419     }
420 
421     /**
422      * Gets the parts returned attribute value.
423      *
424      * @return Returns the itemReturnedTotalParts.
425      */
426     @Override
427     public KualiDecimal getItemReturnedTotalParts() {
428         return itemReturnedTotalParts;
429     }
430 
431     /**
432      * Sets the parts returned attribute value.
433      *
434      * @param itemReturnedTotalParts to set.
435      */
436     @Override
437     public void setItemReturnedTotalParts(KualiDecimal itemReturnedTotalParts) {
438         this.itemReturnedTotalParts = itemReturnedTotalParts;
439     }
440 
441     /**
442      * Gets the parts damaged attribute value.
443      *
444      * @return Returns the itemDamagedTotalParts.
445      */
446     @Override
447     public KualiDecimal getItemDamagedTotalParts() {
448         return itemDamagedTotalParts;
449     }
450 
451     /**
452      * Sets the parts damaged attribute value.
453      *
454      * @param itemDamagedTotalParts to set.
455      */
456     @Override
457     public void setItemDamagedTotalParts(KualiDecimal itemDamagedTotalParts) {
458         this.itemDamagedTotalParts = itemDamagedTotalParts;
459     }
460 
461     /**
462      * Gets the prior parts received attribute value.
463      *
464      * @return Returns the itemReceivedPriorParts.
465      */
466     public KualiDecimal getItemReceivedPriorParts() {
467         if (ObjectUtils.isNull(itemReceivedPriorParts)) {
468             OlePurchaseOrderItem olePoi = (OlePurchaseOrderItem) getPurchaseOrderItem();
469             KualiDecimal priorParts = olePoi.getItemReceivedTotalParts();
470             if (priorParts == null) {
471                 priorParts = new KualiDecimal(0.00);
472             }
473             setItemReceivedPriorParts(priorParts);
474         }
475         return itemReceivedPriorParts;
476     }
477 
478     /**
479      * Sets the prior parts received attribute value.
480      *
481      * @param itemReceivedPriorParts to set.
482      */
483     public void setItemReceivedPriorParts(KualiDecimal itemReceivedPriorParts) {
484         this.itemReceivedPriorParts = itemReceivedPriorParts;
485     }
486 
487     /**
488      * Gets the parts to be received received attribute value.
489      *
490      * @return Returns the itemReceivedToBeParts.
491      */
492     public KualiDecimal getItemReceivedToBeParts() {
493         // lazy loaded
494         if (null != this.getItemOrderedParts()) {
495             KualiDecimal priorParts = getItemReceivedPriorParts();
496             if (priorParts == null) {
497                 priorParts = new KualiDecimal(0.00);
498             }
499             KualiDecimal toBeParts = this.getItemOrderedParts().subtract(priorParts);
500             if (toBeParts.isNegative()) {
501                 toBeParts = KualiDecimal.ZERO;
502             }
503             setItemReceivedToBeParts(toBeParts);
504             // setItemReceivedTotalParts(toBeParts);
505         }
506         return itemReceivedToBeParts;
507     }
508 
509     /**
510      * Sets the prior parts to be received attribute value.
511      *
512      * @param itemReceivedToBeParts to set.
513      */
514     public void setItemReceivedToBeParts(KualiDecimal itemReceivedToBeParts) {
515         this.itemReceivedToBeParts = itemReceivedToBeParts;
516     }
517 
518     /**
519      * Gets the availableToPublic attribute value.
520      *
521      * @return Returns the availableToPublic.
522      */
523     public Boolean getAvailableToPublic() {
524         return availableToPublic;
525     }
526 
527     /**
528      * Sets the availableToPublic attribute value.
529      *
530      * @param availableToPublic to set.
531      */
532     public void setAvailableToPublic(Boolean availableToPublic) {
533         this.availableToPublic = availableToPublic;
534     }
535 
536     /**
537      * Gets the oleFormatId attribute value.
538      *
539      * @return Returns the oleFormatId.
540      */
541     public Integer getOleFormatId() {
542         return oleFormatId;
543     }
544 
545     /**
546      * Sets the oleFormatId attribute value.
547      *
548      * @param oleFormatId to set.
549      */
550     public void setOleFormatId(Integer oleFormatId) {
551         this.oleFormatId = oleFormatId;
552     }
553 
554     /**
555      * Gets the itemOriginalReceivedTotalParts attribute value.
556      *
557      * @return Returns the itemOriginalReceivedTotalParts.
558      */
559     @Override
560     public KualiDecimal getItemOriginalReceivedTotalParts() {
561         return itemOriginalReceivedTotalParts;
562     }
563 
564     /**
565      * Sets the itemOriginalReceivedTotalParts attribute value.
566      *
567      * @param itemOriginalReceivedTotalParts to set.
568      */
569     @Override
570     public void setItemOriginalReceivedTotalParts(KualiDecimal itemOriginalReceivedTotalParts) {
571         this.itemOriginalReceivedTotalParts = itemOriginalReceivedTotalParts;
572     }
573 
574     /**
575      * Gets the itemOriginalReturnedTotalParts attribute value.
576      *
577      * @return Returns the itemOriginalReturnedTotalParts.
578      */
579     @Override
580     public KualiDecimal getItemOriginalReturnedTotalParts() {
581         return itemOriginalReturnedTotalParts;
582     }
583 
584     /**
585      * Sets the itemOriginalReturnedTotalParts attribute value.
586      *
587      * @param itemOriginalReturnedTotalParts to set.
588      */
589     @Override
590     public void setItemOriginalReturnedTotalParts(KualiDecimal itemOriginalReturnedTotalParts) {
591         this.itemOriginalReturnedTotalParts = itemOriginalReturnedTotalParts;
592     }
593 
594     /**
595      * Gets the itemOriginalDamagedTotalParts attribute value.
596      *
597      * @return Returns the itemOriginalDamagedTotalParts.
598      */
599     @Override
600     public KualiDecimal getItemOriginalDamagedTotalParts() {
601         return itemOriginalDamagedTotalParts;
602     }
603 
604     /**
605      * Sets the itemOriginalDamagedTotalParts attribute value.
606      *
607      * @param itemOriginalDamagedTotalParts to set.
608      */
609     @Override
610     public void setItemOriginalDamagedTotalParts(KualiDecimal itemOriginalDamagedTotalParts) {
611         this.itemOriginalDamagedTotalParts = itemOriginalDamagedTotalParts;
612     }
613 
614     /**
615      * Overridden method to check if atleast one parts and quantity related item is entered.
616      *
617      * @see org.kuali.ole.module.purap.businessobject.ReceivingItemBase#isConsideredEntered()
618      */
619     @Override
620     public boolean isConsideredEntered() {
621         LOG.debug("Inside OleLineItemReceivingItem isConsideredEntered");
622         boolean isConsideredEntered = super.isConsideredEntered();
623         if (LOG.isDebugEnabled()) {
624             LOG.debug("isConsideredEntered from LineItemReceivingItem :" + isConsideredEntered);
625         }
626         isConsideredEntered &= !((ObjectUtils.isNotNull(this.getItemOrderedParts()) && this.getItemOrderedParts().isGreaterThan(KualiDecimal.ZERO)) && ((ObjectUtils.isNull(this.getItemReceivedTotalParts()) || this.getItemReceivedTotalParts().isZero()) &&
627                 (ObjectUtils.isNull(this.getItemDamagedTotalParts()) || this.getItemDamagedTotalParts().isZero()) &&
628                 (ObjectUtils.isNull(this.getItemReturnedTotalParts()) || this.getItemReturnedTotalParts().isZero())));
629 
630         if (LOG.isDebugEnabled()) {
631             LOG.debug("isConsideredEntered from OleLineItemReceivingItem :" + isConsideredEntered);
632         }
633         return isConsideredEntered;
634     }
635 
636     // Changes for OLE-2061 Starts
637 
638     /**
639      * Gets list of OleReceivingLineExceptionNotes.
640      *
641      * @return exceptionNoteList.
642      */
643     public List<OleReceivingLineExceptionNotes> getExceptionNoteList() {
644         return exceptionNoteList;
645     }
646 
647     /**
648      * Sets list of OleReceivingLineExceptionNotes.
649      *
650      * @param exceptionNoteList to set.
651      */
652     public void setExceptionNoteList(List<OleReceivingLineExceptionNotes> exceptionNoteList) {
653         this.exceptionNoteList = exceptionNoteList;
654     }
655 
656     /**
657      * Gets exception type id.
658      *
659      * @return exceptionTypeId.
660      */
661     public Integer getExceptionTypeId() {
662         return exceptionTypeId;
663     }
664 
665     /**
666      * Sets exception type id.
667      *
668      * @param exceptionTypeId to set.
669      */
670     public void setExceptionTypeId(Integer exceptionTypeId) {
671         this.exceptionTypeId = exceptionTypeId;
672     }
673 
674     /**
675      * Gets exception notes.
676      *
677      * @return exceptionNotes.
678      */
679     public String getExceptionNotes() {
680         return exceptionNotes;
681     }
682 
683     /**
684      * Sets exception notes.
685      *
686      * @param exceptionNotes to set.
687      */
688     public void setExceptionNotes(String exceptionNotes) {
689         this.exceptionNotes = exceptionNotes;
690     }
691 
692     /**
693      * This method returns OleReceivingLineExceptionNotes class
694      *
695      * @return Class
696      */
697     public Class getExceptionNotesClass() {
698         return OleReceivingLineExceptionNotes.class;
699     }
700 
701     /**
702      * This method adds OleReceivingLineExceptionNotes to the exceptioNoteList.
703      *
704      * @param exceptionNotes
705      */
706     public void addExceptionNote(OleReceivingLineExceptionNotes exceptionNotes) {
707         exceptionNoteList.add(exceptionNotes);
708 
709     }
710 
711     /**
712      * This method deletes exception note from exceptionNoteList at specified index.
713      *
714      * @param lineNum
715      */
716     public void deleteExceptionNote(int lineNum) {
717         exceptionNoteList.remove(lineNum);
718 
719     }
720     // Changes for OLE-2061 Ends
721 
722     // Changes for OLE-2062 Starts
723 
724     /**
725      * Gets list of OleLineItemReceivingReceiptNotes.
726      *
727      * @return noteList.
728      */
729     public List<OleLineItemReceivingReceiptNotes> getNoteList() {
730         return noteList;
731     }
732 
733     /**
734      * Sets list of OleLineItemReceivingReceiptNotes.
735      *
736      * @param noteList to set.
737      */
738     public void setNoteList(List<OleLineItemReceivingReceiptNotes> noteList) {
739         this.noteList = noteList;
740     }
741 
742     /**
743      * Gets list of OleLineItemReceivingReceiptNotes.
744      *
745      * @return receiptNoteList.
746      */
747     public List<OleLineItemReceivingReceiptNotes> getReceiptNoteList() {
748         return receiptNoteList;
749     }
750 
751     /**
752      * Sets list of OleLineItemReceivingReceiptNotes.
753      *
754      * @param receiptNoteList to set.
755      */
756     public void setReceiptNoteList(List<OleLineItemReceivingReceiptNotes> receiptNoteList) {
757         this.receiptNoteList = receiptNoteList;
758     }
759 
760     /**
761      * Gets note type id.
762      *
763      * @return noteTypeId.
764      */
765     public Integer getNoteTypeId() {
766         return noteTypeId;
767     }
768 
769     /**
770      * Sets note type id.
771      *
772      * @param noteTypeId to set.
773      */
774     public void setNoteTypeId(Integer noteTypeId) {
775         this.noteTypeId = noteTypeId;
776     }
777 
778     /**
779      * Gets receipt notes.
780      *
781      * @return receiptNotes.
782      */
783     public String getReceiptNotes() {
784         return receiptNotes;
785     }
786 
787     /**
788      * Sets receipt notes.
789      *
790      * @param receiptNotes to set.
791      */
792     public void setReceiptNotes(String receiptNotes) {
793         this.receiptNotes = receiptNotes;
794     }
795 
796 
797     public String getNotes() {
798         return notes;
799     }
800 
801     public void setNotes(String notes) {
802         this.notes = notes;
803     }
804 
805     /**
806      * This method returns OleLineItemReceivingReceiptNotes class
807      *
808      * @return Class
809      */
810     public Class getOleLineItemReceivingDocClass() {
811         return OleLineItemReceivingDoc.class;
812     }
813 
814     /**
815      * This method returns OleLineItemReceivingReceiptNotes class
816      *
817      * @return Class
818      */
819     public Class getReceiptNotesClass() {
820         return OleLineItemReceivingReceiptNotes.class;
821     }
822 
823     /**
824      * This method adds OleLineItemReceivingReceiptNotes to the receiptNoteList.
825      *
826      * @param receiptNotes
827      */
828     public void addReceiptNote(OleLineItemReceivingReceiptNotes receiptNotes) {
829         receiptNoteList.add(receiptNotes);
830 
831     }
832 
833     /**
834      * This method deletes receipt note from receiptNoteList at specified index.
835      *
836      * @param lineNum
837      */
838     public void deleteReceiptNote(int lineNum) {
839         receiptNoteList.remove(lineNum);
840 
841     }
842 
843     /**
844      * This method adds OleLineItemReceivingReceiptNotes to the noteList.
845      *
846      * @param receiptNotes
847      */
848     public void addNote(OleLineItemReceivingReceiptNotes receiptNotes) {
849         noteList.add(receiptNotes);
850     }
851 
852     /**
853      * This method deletes receipt note from noteList at specified index.
854      *
855      * @param lineNum
856      */
857     public void deleteNote(int lineNum) {
858         noteList.remove(lineNum);
859 
860     }
861     // Changes for OLE-2062 Ends
862 
863     /**
864      * Gets list of Special Handling Notes.
865      *
866      * @return specialHandlingNoteList.
867      */
868     public List<OleLineItemReceivingReceiptNotes> getSpecialHandlingNoteList() {
869         return specialHandlingNoteList;
870     }
871 
872     /**
873      * Sets list of Special Handling Notes.
874      *
875      * @param specialHandlingNoteList.
876      */
877     public void setSpecialHandlingNoteList(List<OleLineItemReceivingReceiptNotes> specialHandlingNoteList) {
878         this.specialHandlingNoteList = specialHandlingNoteList;
879     }
880 
881     /**
882      * Gets acknowledgement flag for special handling notes
883      *
884      * @return notesAck
885      */
886     public boolean isNotesAck() {
887         return notesAck;
888     }
889 
890     /**
891      * Sets acknowledgement flag for special handling notes
892      *
893      * @param notesAck
894      */
895     public void setNotesAck(boolean notesAck) {
896         this.notesAck = notesAck;
897     }
898 
899     /**
900      * Gets size of receipt notes list retrived from database
901      *
902      * @return receiptNoteListSize
903      */
904     public Integer getReceiptNoteListSize() {
905         return receiptNoteListSize;
906     }
907 
908     /**
909      * Sets size of receipt notes list retrived from database
910      *
911      * @param receiptNoteListSize
912      */
913     public void setReceiptNoteListSize(Integer receiptNoteListSize) {
914         this.receiptNoteListSize = receiptNoteListSize;
915     }
916 
917     public String getItemTitleId() {
918         return itemTitleId;
919     }
920 
921     public void setItemTitleId(String itemTitleId) {
922         this.itemTitleId = itemTitleId;
923     }
924 
925     /**
926      * Retreives a purchase order item by inspecting the item type to see if its above the line or below the line and returns the
927      * appropriate type.
928      *
929      * @return purchase order item
930      */
931     @Override
932     public PurchaseOrderItem getPurchaseOrderItem() {
933         if (LOG.isDebugEnabled()) {
934             LOG.debug("Inside OleLineItemReceivingItem getPurchaseOrderItem");
935             LOG.debug("Ole Line Item Receiving Document before refresh :" + getLineItemReceivingDocument());
936         }
937         //if (ObjectUtils.isNotNull(this.getLineItemReceivingDocument())) {
938         if (ObjectUtils.isNull(this.getLineItemReceivingDocument())) {
939             this.refreshReferenceObject("lineItemReceivingDocument");
940         }
941         //}
942         // ideally we should do this a different way - maybe move it all into the service or save this info somehow (make sure and
943         // update though)
944         if (getLineItemReceivingDocument() != null) {
945             PurchaseOrderDocument po = getLineItemReceivingDocument().getPurchaseOrderDocument();
946             PurchaseOrderItem poi = null;
947             if (this.getItemType().isLineItemIndicator()) {
948                 poi = (PurchaseOrderItem) po.getItem(this.getItemLineNumber().intValue() - 1);
949                 // throw error if line numbers don't match
950             }
951             if (poi != null) {
952                 return poi;
953             } else {
954                 // LOG.debug("getPurchaseOrderItem() Returning null because PurchaseOrderItem object for line number" +
955                 // getItemLineNumber() + "or itemType " + getItemTypeCode() + " is null");
956                 return null;
957             }
958         } else {
959             LOG.error("getLineItemReceivingDocument() Returning null in getPurchaseOrderItem()");
960             throw new PurError("Receiving Line Object in Purchase Order item line number " + getItemLineNumber() + "or itemType " + getItemTypeCode() + " is null");
961         }
962     }
963 
964     public BibInfoBean getBibInfoBean() {
965         return bibInfoBean;
966     }
967 
968     public void setBibInfoBean(BibInfoBean bibInfoBean) {
969         this.bibInfoBean = bibInfoBean;
970     }
971 
972     public String getBibUUID() {
973         return bibUUID;
974     }
975 
976     public void setBibUUID(String bibUUID) {
977         this.bibUUID = bibUUID;
978     }
979 
980     public DocData getDocData() {
981         return docData;
982     }
983 
984     public void setDocData(DocData docData) {
985         this.docData = docData;
986     }
987 
988     /**
989      * Gets the itemCopiesId attribute.
990      *
991      * @return Returns the itemCopiesId.
992      */
993     public Integer getItemCopiesId() {
994         return itemCopiesId;
995     }
996 
997     /**
998      * Sets the itemCopiesId attribute value.
999      *
1000      * @param itemCopiesId The itemCopiesId to set.
1001      */
1002     public void setItemCopiesId(Integer itemCopiesId) {
1003         this.itemCopiesId = itemCopiesId;
1004     }
1005 
1006     /**
1007      * Gets the parts attribute.
1008      *
1009      * @return Returns the parts.
1010      */
1011     public KualiInteger getParts() {
1012         return parts;
1013     }
1014 
1015     /**
1016      * Sets the parts attribute value.
1017      *
1018      * @param parts The parts to set.
1019      */
1020     public void setParts(KualiInteger parts) {
1021         this.parts = parts;
1022     }
1023 
1024     /**
1025      * Gets the itemCopies attribute.
1026      *
1027      * @return Returns the itemCopies.
1028      */
1029     public KualiDecimal getItemCopies() {
1030         return itemCopies;
1031     }
1032 
1033     /**
1034      * Sets the itemCopies attribute value.
1035      *
1036      * @param itemCopies The itemCopies to set.
1037      */
1038     public void setItemCopies(KualiDecimal itemCopies) {
1039         this.itemCopies = itemCopies;
1040     }
1041 
1042     /**
1043      * Gets the partEnumeration attribute.
1044      *
1045      * @return Returns the partEnumeration.
1046      */
1047     public String getPartEnumeration() {
1048         return partEnumeration;
1049     }
1050 
1051     /**
1052      * Sets the partEnumeration attribute value.
1053      *
1054      * @param partEnumeration The partEnumeration to set.
1055      */
1056     public void setPartEnumeration(String partEnumeration) {
1057         this.partEnumeration = partEnumeration;
1058     }
1059 
1060     /**
1061      * Gets the locationCopies attribute.
1062      *
1063      * @return Returns the locationCopies.
1064      */
1065     public String getLocationCopies() {
1066         return locationCopies;
1067     }
1068 
1069     /**
1070      * Sets the locationCopies attribute value.
1071      *
1072      * @param locationCopies The locationCopies to set.
1073      */
1074     public void setLocationCopies(String locationCopies) {
1075         this.locationCopies = locationCopies;
1076     }
1077 
1078     /**
1079      * Gets the startingCopyNumber attribute.
1080      *
1081      * @return Returns the startingCopyNumber.
1082      */
1083     public KualiInteger getStartingCopyNumber() {
1084         return startingCopyNumber;
1085     }
1086 
1087     /**
1088      * Sets the startingCopyNumber attribute value.
1089      *
1090      * @param startingCopyNumber The startingCopyNumber to set.
1091      */
1092     public void setStartingCopyNumber(KualiInteger startingCopyNumber) {
1093         this.startingCopyNumber = startingCopyNumber;
1094     }
1095 
1096     /**
1097      * Gets the copies attribute.
1098      *
1099      * @return Returns the copies.
1100      */
1101     public List<OleCopies> getCopies() {
1102         return copies;
1103     }
1104 
1105     /**
1106      * Sets the copies attribute value.
1107      *
1108      * @param copies The copies to set.
1109      */
1110     public void setCopies(List<OleCopies> copies) {
1111         this.copies = copies;
1112     }
1113 
1114     // Added for Jira OLE-1900 Starts
1115 
1116     /**
1117      * This method will set copies into list of copies for LineItem.
1118      *
1119      * @param singleItem
1120      * @param workBibDocument
1121      * @return
1122      */
1123     public List<OleCopies> setCopiesToLineItem(WorkBibDocument workBibDocument) {
1124         List<WorkInstanceDocument> instanceDocuments = workBibDocument.getWorkInstanceDocumentList();
1125         List<OleCopies> copies = new ArrayList<OleCopies>();
1126         for (WorkInstanceDocument workInstanceDocument : instanceDocuments) {
1127             List<WorkItemDocument> itemDocuments = workInstanceDocument.getItemDocumentList();
1128             StringBuffer enumeration = new StringBuffer();
1129             for (int itemDocs = 0; itemDocs < itemDocuments.size(); itemDocs++) {
1130                 if (itemDocs + 1 == itemDocuments.size()) {
1131                     enumeration = enumeration.append(itemDocuments.get(itemDocs).getEnumeration());
1132                 } else {
1133                     enumeration = enumeration.append(itemDocuments.get(itemDocs).getEnumeration() + ",");
1134                 }
1135 
1136             }
1137             int startingCopy = 0;
1138             if (this.getItemReturnedTotalParts().intValue() != 0 && null != enumeration) {
1139                 String enumerationSplit = enumeration.substring(1, 2);
1140                 boolean isint = checkIsEnumerationSplitIsIntegerOrNot(enumerationSplit);
1141                 if (isint) {
1142                     startingCopy = Integer.parseInt(enumerationSplit);
1143                 }
1144             }
1145             int noOfCopies = workInstanceDocument.getItemDocumentList().size() / this.getItemOrderedParts().intValue();
1146             OleRequisitionCopies copy = new OleRequisitionCopies();
1147             copy.setParts(new KualiInteger(this.getItemOrderedParts().intValue()));
1148             copy.setLocationCopies(workInstanceDocument.getHoldingsDocument().getLocationName());
1149             copy.setItemCopies(new KualiDecimal(noOfCopies));
1150             copy.setPartEnumeration(enumeration.toString());
1151             copy.setStartingCopyNumber(new KualiInteger(startingCopy));
1152             copies.add(copy);
1153         }
1154         return copies;
1155     }
1156 
1157     public boolean checkIsEnumerationSplitIsIntegerOrNot(String enumerationSplit) {
1158         try {
1159             int startingCopy = Integer.parseInt(enumerationSplit);
1160         } catch (NumberFormatException e) {
1161             return false;
1162         }
1163         return true;
1164     }
1165 
1166     /**
1167      * This method takes List of UUids as parameter and creates a LinkedHashMap with instance as key and id as value. and calls
1168      * Docstore's QueryServiceImpl class getWorkBibRecords method and return workBibDocument for passed instance Id.
1169      *
1170      * @param instanceIdsList
1171      * @return List<WorkBibDocument>
1172      */
1173 //    private List<WorkBibDocument> getWorkBibDocuments(List<String> instanceIdsList) {
1174 //        List<LinkedHashMap<String, String>> instanceIdMapList = new ArrayList<LinkedHashMap<String, String>>();
1175 //        for (String instanceId : instanceIdsList) {
1176 //            LinkedHashMap<String, String> instanceIdMap = new LinkedHashMap<String, String>();
1177 //            instanceIdMap.put(DocType.INSTANCE.getDescription(), instanceId);
1178 //            instanceIdMapList.add(instanceIdMap);
1179 //        }
1180 //
1181 //        QueryService queryService = QueryServiceImpl.getInstance();
1182 //        List<WorkBibDocument> workBibDocuments = new ArrayList<WorkBibDocument>();
1183 //        try {
1184 //            workBibDocuments = queryService.getWorkBibRecords(instanceIdMapList);
1185 //        } catch (Exception ex) {
1186 //            // TODO Auto-generated catch block
1187 //            ex.printStackTrace();
1188 //        }
1189 //        return workBibDocuments;
1190 //    }
1191 
1192     /**
1193      * Gets the oleItemOrderedQuantity attribute.
1194      *
1195      * @return Returns the oleItemOrderedQuantity.
1196      */
1197     public KualiInteger getOleItemOrderedQuantity() {
1198         return new KualiInteger(super.getItemOrderedQuantity().intValue());
1199     }
1200 
1201     /**
1202      * Sets the oleItemOrderedQuantity attribute value.
1203      *
1204      * @param oleItemOrderedQuantity The oleItemOrderedQuantity to set.
1205      */
1206     public void setOleItemOrderedQuantity(KualiInteger oleItemOrderedQuantity) {
1207         super.setItemOrderedQuantity(new KualiDecimal(oleItemOrderedQuantity.intValue()));
1208     }
1209 
1210     /**
1211      * Gets the oleItemReceivedPriorQuantity attribute.
1212      *
1213      * @return Returns the oleItemReceivedPriorQuantity.
1214      */
1215     public KualiInteger getOleItemReceivedPriorQuantity() {
1216         return new KualiInteger(super.getItemReceivedPriorQuantity().intValue());
1217     }
1218 
1219     /**
1220      * Sets the oleItemReceivedPriorQuantity attribute value.
1221      *
1222      * @param oleItemReceivedPriorQuantity The oleItemReceivedPriorQuantity to set.
1223      */
1224     public void setOleItemReceivedPriorQuantity(KualiInteger oleItemReceivedPriorQuantity) {
1225         super.setItemReceivedPriorQuantity(new KualiDecimal(oleItemReceivedPriorQuantity.intValue()));
1226     }
1227 
1228     /**
1229      * Gets the oleItemReceivedToBeQuantity attribute.
1230      *
1231      * @return Returns the oleItemReceivedToBeQuantity.
1232      */
1233     public KualiInteger getOleItemReceivedToBeQuantity() {
1234         return new KualiInteger(super.getItemReceivedToBeQuantity().intValue());
1235     }
1236 
1237     /**
1238      * Sets the oleItemReceivedToBeQuantity attribute value.
1239      *
1240      * @param oleItemReceivedToBeQuantity The oleItemReceivedToBeQuantity to set.
1241      */
1242     public void setOleItemReceivedToBeQuantity(KualiInteger oleItemReceivedToBeQuantity) {
1243         super.setItemReceivedToBeQuantity(new KualiDecimal(oleItemReceivedToBeQuantity.intValue()));
1244     }
1245 
1246     /**
1247      * Gets the oleItemReceivedTotalQuantity attribute.
1248      *
1249      * @return Returns the oleItemReceivedTotalQuantity.
1250      */
1251     public KualiInteger getOleItemReceivedTotalQuantity() {
1252         return new KualiInteger(super.getItemReceivedTotalQuantity().intValue());
1253     }
1254 
1255     /**
1256      * Sets the oleItemReceivedTotalQuantity attribute value.
1257      *
1258      * @param oleItemReceivedTotalQuantity The oleItemReceivedTotalQuantity to set.
1259      */
1260     public void setOleItemReceivedTotalQuantity(KualiInteger oleItemReceivedTotalQuantity) {
1261         super.setItemReceivedTotalQuantity(new KualiDecimal(oleItemReceivedTotalQuantity.intValue()));
1262     }
1263 
1264     /**
1265      * Gets the oleItemReturnedTotalQuantity attribute.
1266      *
1267      * @return Returns the oleItemReturnedTotalQuantity.
1268      */
1269     public KualiInteger getOleItemReturnedTotalQuantity() {
1270         return new KualiInteger(super.getItemReturnedTotalQuantity().intValue());
1271     }
1272 
1273     /**
1274      * Sets the oleItemReturnedTotalQuantity attribute value.
1275      *
1276      * @param oleItemReturnedTotalQuantity The oleItemReturnedTotalQuantity to set.
1277      */
1278     public void setOleItemReturnedTotalQuantity(KualiInteger oleItemReturnedTotalQuantity) {
1279         super.setItemReturnedTotalQuantity(new KualiDecimal(oleItemReturnedTotalQuantity.intValue()));
1280     }
1281 
1282     /**
1283      * Gets the oleItemDamagedTotalQuantity attribute.
1284      *
1285      * @return Returns the oleItemDamagedTotalQuantity.
1286      */
1287     public KualiInteger getOleItemDamagedTotalQuantity() {
1288         return new KualiInteger(super.getItemDamagedTotalQuantity().intValue());
1289     }
1290 
1291     /**
1292      * Sets the oleItemDamagedTotalQuantity attribute value.
1293      *
1294      * @param oleItemDamagedTotalQuantity The oleItemDamagedTotalQuantity to set.
1295      */
1296     public void setOleItemDamagedTotalQuantity(KualiInteger oleItemDamagedTotalQuantity) {
1297         super.setItemDamagedTotalQuantity(new KualiDecimal(oleItemDamagedTotalQuantity.intValue()));
1298     }
1299 
1300     /**
1301      * Gets the oleItemOrderedParts attribute.
1302      *
1303      * @return Returns the oleItemOrderedParts.
1304      */
1305     public KualiInteger getOleItemOrderedParts() {
1306         return new KualiInteger(getItemOrderedParts().intValue());
1307     }
1308 
1309     /**
1310      * Sets the oleItemOrderedParts attribute value.
1311      *
1312      * @param oleItemOrderedParts The oleItemOrderedParts to set.
1313      */
1314     public void setOleItemOrderedParts(KualiInteger oleItemOrderedParts) {
1315         setItemOrderedParts(new KualiDecimal(oleItemOrderedParts.intValue()));
1316     }
1317 
1318     /**
1319      * Gets the oleItemReceivedPriorParts attribute.
1320      *
1321      * @return Returns the oleItemReceivedPriorParts.
1322      */
1323     public KualiInteger getOleItemReceivedPriorParts() {
1324         return new KualiInteger(getItemReceivedPriorParts().intValue());
1325     }
1326 
1327     /**
1328      * Sets the oleItemReceivedPriorParts attribute value.
1329      *
1330      * @param oleItemReceivedPriorParts The oleItemReceivedPriorParts to set.
1331      */
1332     public void setOleItemReceivedPriorParts(KualiInteger oleItemReceivedPriorParts) {
1333         setItemReceivedPriorParts(new KualiDecimal(oleItemReceivedPriorParts.intValue()));
1334     }
1335 
1336     /**
1337      * Gets the oleItemReceivedToBeParts attribute.
1338      *
1339      * @return Returns the oleItemReceivedToBeParts.
1340      */
1341     public KualiInteger getOleItemReceivedToBeParts() {
1342         return new KualiInteger(getItemReceivedToBeParts().intValue());
1343     }
1344 
1345     /**
1346      * Sets the oleItemReceivedToBeParts attribute value.
1347      *
1348      * @param oleItemReceivedToBeParts The oleItemReceivedToBeParts to set.
1349      */
1350     public void setOleItemReceivedToBeParts(KualiInteger oleItemReceivedToBeParts) {
1351         setItemReceivedToBeParts(new KualiDecimal(oleItemReceivedToBeParts.intValue()));
1352     }
1353 
1354     /**
1355      * Gets the oleItemReceivedTotalParts attribute.
1356      *
1357      * @return Returns the oleItemReceivedTotalParts.
1358      */
1359     public KualiInteger getOleItemReceivedTotalParts() {
1360         return new KualiInteger(getItemReceivedTotalParts().intValue());
1361     }
1362 
1363     /**
1364      * Sets the oleItemReceivedTotalParts attribute value.
1365      *
1366      * @param oleItemReceivedTotalParts The oleItemReceivedTotalParts to set.
1367      */
1368     public void setOleItemReceivedTotalParts(KualiInteger oleItemReceivedTotalParts) {
1369         setItemReceivedTotalParts(new KualiDecimal(oleItemReceivedTotalParts.intValue()));
1370     }
1371 
1372     /**
1373      * Gets the oleItemReturnedTotalParts attribute.
1374      *
1375      * @return Returns the oleItemReturnedTotalParts.
1376      */
1377     public KualiInteger getOleItemReturnedTotalParts() {
1378         return new KualiInteger(getItemReturnedTotalParts().intValue());
1379     }
1380 
1381     /**
1382      * Sets the oleItemReturnedTotalParts attribute value.
1383      *
1384      * @param oleItemReturnedTotalParts The oleItemReturnedTotalParts to set.
1385      */
1386     public void setOleItemReturnedTotalParts(KualiInteger oleItemReturnedTotalParts) {
1387         setItemReturnedTotalParts(new KualiDecimal(oleItemReturnedTotalParts.intValue()));
1388     }
1389 
1390     /**
1391      * Gets the oleItemDamagedTotalParts attribute.
1392      *
1393      * @return Returns the oleItemDamagedTotalParts.
1394      */
1395     public KualiInteger getOleItemDamagedTotalParts() {
1396         return new KualiInteger(getItemDamagedTotalParts().intValue());
1397     }
1398 
1399     /**
1400      * Sets the oleItemDamagedTotalParts attribute value.
1401      *
1402      * @param oleItemDamagedTotalParts The oleItemDamagedTotalParts to set.
1403      */
1404     public void setOleItemDamagedTotalParts(KualiInteger oleItemDamagedTotalParts) {
1405         setItemDamagedTotalParts(new KualiDecimal(oleItemDamagedTotalParts.intValue()));
1406     }
1407 
1408 
1409     // Added for Jira OLE-1900 Ends
1410 
1411 
1412     public String getDonorCode() {
1413         return donorCode;
1414     }
1415 
1416     public void setDonorCode(String donorCode) {
1417         this.donorCode = donorCode;
1418     }
1419 
1420     public List<OLELinkPurapDonor> getOleDonors() {
1421         return oleDonors;
1422     }
1423 
1424     public void setOleDonors(List<OLELinkPurapDonor> oleDonors) {
1425         this.oleDonors = oleDonors;
1426     }
1427 
1428     public String getEnumeration() {
1429         return enumeration;
1430     }
1431 
1432     public void setEnumeration(String enumeration) {
1433         this.enumeration = enumeration;
1434     }
1435 
1436     public String getLocation() {
1437         return location;
1438     }
1439 
1440     public void setLocation(String location) {
1441         this.location = location;
1442     }
1443 
1444     public String getCopyNumber() {
1445         return copyNumber;
1446     }
1447 
1448     public void setCopyNumber(String copyNumber) {
1449         this.copyNumber = copyNumber;
1450     }
1451 
1452     public String getReceiptStatus() {
1453         return receiptStatus;
1454     }
1455 
1456     public void setReceiptStatus(String receiptStatus) {
1457         this.receiptStatus = receiptStatus;
1458     }
1459 
1460     public List<OleCopy> getCopyList() {
1461         return copyList;
1462     }
1463 
1464     public void setCopyList(List<OleCopy> copyList) {
1465         this.copyList = copyList;
1466     }
1467 }
1468