1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.coa.document.validation.impl;
17
18 import org.kuali.ole.coa.businessobject.AccountDelegateModel;
19 import org.kuali.ole.coa.businessobject.AccountDelegateModelDetail;
20 import org.kuali.rice.kns.document.MaintenanceDocument;
21
22
23
24
25
26 public class OrganizationRoutingModelPreRules extends MaintenancePreRulesBase {
27 public OrganizationRoutingModelPreRules() {
28 }
29
30
31
32
33
34
35
36
37 @Override
38 protected boolean doCustomPreRules(MaintenanceDocument maintDoc) {
39 AccountDelegateModel model = (AccountDelegateModel) maintDoc.getNewMaintainableObject().getBusinessObject();
40 copyKeyAttributesToModelDetail(model);
41 return true;
42 }
43
44
45
46
47
48
49
50 protected void copyKeyAttributesToModelDetail(AccountDelegateModel model) {
51 for (AccountDelegateModelDetail modelDelegate : model.getAccountDelegateModelDetails()) {
52 modelDelegate.setChartOfAccountsCode(model.getChartOfAccountsCode());
53 modelDelegate.setOrganizationCode(model.getOrganizationCode());
54 modelDelegate.setAccountDelegateModelName(model.getAccountDelegateModelName());
55 }
56 }
57
58 }