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