1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.purap.businessobject;
17
18 import org.kuali.ole.integration.purap.ItemCapitalAsset;
19 import org.kuali.ole.module.purap.document.OlePurchasingDocument;
20 import org.kuali.ole.module.purap.document.PurchasingDocument;
21 import org.kuali.ole.module.purap.document.RequisitionDocument;
22 import org.kuali.rice.krad.util.ObjectUtils;
23
24 public class RequisitionCapitalAssetItem extends PurchasingCapitalAssetItemBase {
25
26 private Integer purapDocumentIdentifier;
27
28 public RequisitionCapitalAssetItem() {
29 super();
30 this.setPurchasingCapitalAssetSystem(new RequisitionCapitalAssetSystem());
31 }
32
33 public RequisitionCapitalAssetItem(OlePurchasingDocument pd) {
34 super(pd);
35 setPurapDocumentIdentifier(pd.getPurapDocumentIdentifier());
36 this.setPurchasingCapitalAssetSystem(new RequisitionCapitalAssetSystem());
37 }
38
39 public RequisitionCapitalAssetItem(PurchasingCapitalAssetItem reqAssetItem, Integer itemIdentifier) {
40 this.setItemIdentifier(itemIdentifier);
41 this.setCapitalAssetTransactionTypeCode(reqAssetItem.getCapitalAssetTransactionTypeCode());
42 if (ObjectUtils.isNotNull(reqAssetItem.getPurchasingCapitalAssetSystem())) {
43 this.setPurchasingCapitalAssetSystem(new PurchaseOrderCapitalAssetSystem(reqAssetItem.getPurchasingCapitalAssetSystem()));
44 }
45 }
46
47 public Integer getPurapDocumentIdentifier() {
48 return purapDocumentIdentifier;
49 }
50
51 public void setPurapDocumentIdentifier(Integer purapDocumentIdentifier) {
52 this.purapDocumentIdentifier = purapDocumentIdentifier;
53 }
54
55 @Override
56 public void setPurchasingDocument(OlePurchasingDocument pd) {
57 super.setPurchasingDocument(pd);
58
59 RequisitionDocument req = (RequisitionDocument) pd;
60 if (req != null) {
61 setPurapDocumentIdentifier(req.getPurapDocumentIdentifier());
62 }
63 }
64
65 @Override
66 public void setPurchasingDocument(PurchasingDocument pd) {
67
68 }
69
70 @Override
71 public ItemCapitalAsset setupNewPurchasingItemCapitalAssetLine() {
72 ItemCapitalAsset asset = new RequisitionItemCapitalAsset();
73 return asset;
74 }
75
76 }