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.PurchasingDocument;
20 import org.kuali.ole.module.purap.document.RequisitionDocument;
21 import org.kuali.rice.krad.util.ObjectUtils;
22
23 public class RequisitionCapitalAssetItem extends PurchasingCapitalAssetItemBase {
24
25 private Integer purapDocumentIdentifier;
26
27 public RequisitionCapitalAssetItem() {
28 super();
29 this.setPurchasingCapitalAssetSystem(new RequisitionCapitalAssetSystem());
30 }
31
32 public RequisitionCapitalAssetItem(PurchasingDocument pd) {
33 super(pd);
34 setPurapDocumentIdentifier(pd.getPurapDocumentIdentifier());
35 this.setPurchasingCapitalAssetSystem(new RequisitionCapitalAssetSystem());
36 }
37
38 public RequisitionCapitalAssetItem(PurchasingCapitalAssetItem reqAssetItem, Integer itemIdentifier) {
39 this.setItemIdentifier(itemIdentifier);
40 this.setCapitalAssetTransactionTypeCode(reqAssetItem.getCapitalAssetTransactionTypeCode());
41 if (ObjectUtils.isNotNull(reqAssetItem.getPurchasingCapitalAssetSystem())) {
42 this.setPurchasingCapitalAssetSystem(new PurchaseOrderCapitalAssetSystem(reqAssetItem.getPurchasingCapitalAssetSystem()));
43 }
44 }
45
46 public Integer getPurapDocumentIdentifier() {
47 return purapDocumentIdentifier;
48 }
49
50 public void setPurapDocumentIdentifier(Integer purapDocumentIdentifier) {
51 this.purapDocumentIdentifier = purapDocumentIdentifier;
52 }
53
54 @Override
55 public void setPurchasingDocument(PurchasingDocument pd) {
56 super.setPurchasingDocument(pd);
57
58 RequisitionDocument req = (RequisitionDocument) pd;
59 if (req != null) {
60 setPurapDocumentIdentifier(req.getPurapDocumentIdentifier());
61 }
62 }
63
64 @Override
65 public ItemCapitalAsset setupNewPurchasingItemCapitalAssetLine() {
66 ItemCapitalAsset asset = new RequisitionItemCapitalAsset();
67 return asset;
68 }
69
70 }