1   
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  
13  
14  
15  
16  
17  package org.kuali.ole.coa.businessobject;
18  
19  import java.util.ArrayList;
20  import java.util.LinkedHashMap;
21  import java.util.List;
22  
23  import org.apache.log4j.Logger;
24  import org.kuali.ole.sys.context.SpringContext;
25  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
26  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
27  import org.kuali.rice.krad.service.BusinessObjectService;
28  
29  
30  
31  
32  public class AccountDelegateModel extends PersistableBusinessObjectBase implements MutableInactivatable {
33      private static final Logger LOG = Logger.getLogger(AccountDelegateModel.class);
34  
35      private String chartOfAccountsCode;
36      private String organizationCode;
37      private String accountDelegateModelName;
38      private boolean active;
39      private List<AccountDelegateModelDetail> accountDelegateModelDetails;
40  
41      private Organization organization;
42      private Chart chartOfAccounts;
43  
44      
45  
46  
47      public AccountDelegateModel() {
48          accountDelegateModelDetails = new ArrayList<AccountDelegateModelDetail>();
49      }
50  
51      
52  
53  
54  
55  
56      public String getChartOfAccountsCode() {
57          return chartOfAccountsCode;
58      }
59  
60      
61  
62  
63  
64  
65      public void setChartOfAccountsCode(String chartOfAccountsCode) {
66          this.chartOfAccountsCode = chartOfAccountsCode;
67      }
68  
69  
70      
71  
72  
73  
74  
75      public String getOrganizationCode() {
76          return organizationCode;
77      }
78  
79      
80  
81  
82  
83  
84      public void setOrganizationCode(String organizationCode) {
85          this.organizationCode = organizationCode;
86      }
87  
88  
89      
90  
91  
92  
93  
94      public String getAccountDelegateModelName() {
95          return accountDelegateModelName;
96      }
97  
98      
99  
100 
101 
102 
103     public void setAccountDelegateModelName(String organizationRoutingModelName) {
104         this.accountDelegateModelName = organizationRoutingModelName;
105     }
106 
107 
108     
109 
110 
111 
112 
113     public Organization getOrganization() {
114         return organization;
115     }
116 
117     
118 
119 
120 
121 
122 
123     public void setOrganization(Organization organization) {
124         this.organization = organization;
125     }
126 
127     
128 
129 
130 
131 
132     public Chart getChartOfAccounts() {
133         return chartOfAccounts;
134     }
135 
136     
137 
138 
139 
140 
141 
142     public void setChartOfAccounts(Chart chartOfAccounts) {
143         this.chartOfAccounts = chartOfAccounts;
144     }
145 
146     
147 
148 
149 
150 
151     public List<AccountDelegateModelDetail> getAccountDelegateModelDetails() {
152         return accountDelegateModelDetails;
153     }
154 
155     
156 
157 
158 
159 
160     public void setAccountDelegateModelDetails(List<AccountDelegateModelDetail> organizationRoutingModel) {
161         this.accountDelegateModelDetails = organizationRoutingModel;
162     }
163 
164     
165 
166 
167     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
168         LinkedHashMap m = new LinkedHashMap();
169         m.put("chartOfAccountsCode", this.chartOfAccountsCode);
170         m.put("organizationCode", this.organizationCode);
171         m.put("accountDelegateModelName", this.accountDelegateModelName);
172         return m;
173     }
174 
175     
176 
177 
178     @Override
179     public void linkEditableUserFields() {
180         super.linkEditableUserFields();
181         if (this == null) {
182             throw new IllegalArgumentException("parameter passed in was null");
183         }
184         List bos = new ArrayList();
185         bos.addAll(getAccountDelegateModelDetails());
186         SpringContext.getBean(BusinessObjectService.class).linkUserFields(bos);
187     }
188 
189     
190 
191 
192 
193     public boolean isActive() {
194         return active;
195     }
196 
197     
198 
199 
200 
201     public void setActive(boolean active) {
202         this.active = active;
203     }
204 }