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
19 import org.kuali.ole.integration.purap.CapitalAssetLocation;
20 import org.kuali.ole.integration.purap.CapitalAssetSystem;
21 import org.kuali.ole.integration.purap.ItemCapitalAsset;
22
23
24
25
26
27 public class RequisitionCapitalAssetSystem extends PurchasingCapitalAssetSystemBase {
28
29 protected Integer purapDocumentIdentifier;
30
31
32
33
34 public RequisitionCapitalAssetSystem() {
35 super();
36 }
37
38 public RequisitionCapitalAssetSystem(CapitalAssetSystem originalSystem) {
39 super();
40 if (originalSystem != null) {
41 this.setCapitalAssetSystemDescription(originalSystem.getCapitalAssetSystemDescription());
42 this.setCapitalAssetNotReceivedCurrentFiscalYearIndicator(originalSystem.isCapitalAssetNotReceivedCurrentFiscalYearIndicator());
43 this.setCapitalAssetTypeCode(originalSystem.getCapitalAssetTypeCode());
44 this.setCapitalAssetManufacturerName(originalSystem.getCapitalAssetManufacturerName());
45 this.setCapitalAssetModelDescription(originalSystem.getCapitalAssetModelDescription());
46 this.setCapitalAssetNoteText(originalSystem.getCapitalAssetNoteText());
47 populatePurchaseOrderItemCapitalAssets(originalSystem);
48 populateCapitalAssetLocations(originalSystem);
49 this.setCapitalAssetCountAssetNumber(originalSystem.getCapitalAssetCountAssetNumber());
50 }
51 }
52
53 private void populatePurchaseOrderItemCapitalAssets(CapitalAssetSystem originalSystem) {
54 for (ItemCapitalAsset reqAsset : originalSystem.getItemCapitalAssets()) {
55 PurchaseOrderItemCapitalAsset poAsset = new PurchaseOrderItemCapitalAsset(reqAsset.getCapitalAssetNumber());
56 this.getItemCapitalAssets().add(poAsset);
57 }
58 }
59
60 private void populateCapitalAssetLocations(CapitalAssetSystem originalSystem) {
61 for (CapitalAssetLocation reqLocation : originalSystem.getCapitalAssetLocations()) {
62 PurchaseOrderCapitalAssetLocation poLocation = new PurchaseOrderCapitalAssetLocation();
63 poLocation.setItemQuantity(reqLocation.getItemQuantity());
64 poLocation.setCampusCode(reqLocation.getCampusCode());
65 poLocation.setOffCampusIndicator(reqLocation.isOffCampusIndicator());
66 poLocation.setBuildingCode(reqLocation.getBuildingCode());
67 poLocation.setBuildingRoomNumber(reqLocation.getBuildingRoomNumber());
68 poLocation.setCapitalAssetLine1Address(reqLocation.getCapitalAssetLine1Address());
69 poLocation.setCapitalAssetCityName(reqLocation.getCapitalAssetCityName());
70 poLocation.setCapitalAssetStateCode(reqLocation.getCapitalAssetStateCode());
71 poLocation.setCapitalAssetPostalCode(reqLocation.getCapitalAssetPostalCode());
72 poLocation.setCapitalAssetCountryCode(reqLocation.getCapitalAssetCountryCode());
73 this.getCapitalAssetLocations().add(poLocation);
74 }
75 }
76
77 @Override
78 public Class getCapitalAssetLocationClass() {
79 return RequisitionCapitalAssetLocation.class;
80 }
81
82 @Override
83 public Class getItemCapitalAssetClass() {
84 return RequisitionItemCapitalAsset.class;
85 }
86
87 public Integer getPurapDocumentIdentifier() {
88 return purapDocumentIdentifier;
89 }
90
91 public void setPurapDocumentIdentifier(Integer purapDocumentIdentifier) {
92 this.purapDocumentIdentifier = purapDocumentIdentifier;
93 }
94
95 }