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.kuali.ole.sys.businessobject.FiscalYearBasedBusinessObject;
24 import org.kuali.ole.sys.businessobject.SystemOptions;
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.util.ObjectUtils;
28
29
30
31
32 public class OrganizationReversion extends PersistableBusinessObjectBase implements MutableInactivatable, CarryForwardReversionProcessOrganizationInfo, FiscalYearBasedBusinessObject {
33
34 private Integer universityFiscalYear;
35 private String chartOfAccountsCode;
36 private String organizationCode;
37 private String budgetReversionChartOfAccountsCode;
38 private String budgetReversionAccountNumber;
39 private boolean carryForwardByObjectCodeIndicator;
40 private String cashReversionFinancialChartOfAccountsCode;
41 private String cashReversionAccountNumber;
42 private Chart chartOfAccounts;
43 private Account cashReversionAccount;
44 private Account budgetReversionAccount;
45 private Chart budgetReversionChartOfAccounts;
46 private Chart cashReversionFinancialChartOfAccounts;
47 private SystemOptions universityFiscal;
48 private Organization organization;
49 private List<Organization> organizations;
50 private List<OrganizationReversionDetail> organizationReversionDetail;
51 private boolean active;
52
53
54
55
56 public OrganizationReversion() {
57 organizations = new ArrayList<Organization>();
58 organizationReversionDetail = new ArrayList<OrganizationReversionDetail>();
59 }
60
61 public List<OrganizationReversionDetail> getOrganizationReversionDetail() {
62 return organizationReversionDetail;
63 }
64
65 public void addOrganizationReversionDetail(OrganizationReversionDetail ord) {
66 organizationReversionDetail.add(ord);
67 }
68
69 public void setOrganizationReversionDetail(List<OrganizationReversionDetail> organizationReversionDetail) {
70 this.organizationReversionDetail = organizationReversionDetail;
71 }
72
73 public OrganizationReversionCategoryInfo getOrganizationReversionDetail(String categoryCode) {
74 for (OrganizationReversionDetail element : organizationReversionDetail) {
75 if (element.getOrganizationReversionCategoryCode().equals(categoryCode)) {
76 if (!element.isActive()) {
77 return null;
78 } else {
79 return element;
80 }
81 }
82 }
83 return null;
84 }
85
86
87
88
89
90
91 public Integer getUniversityFiscalYear() {
92 return universityFiscalYear;
93 }
94
95
96
97
98
99
100 public void setUniversityFiscalYear(Integer universityFiscalYear) {
101 this.universityFiscalYear = universityFiscalYear;
102 }
103
104
105
106
107
108
109
110 public String getChartOfAccountsCode() {
111 return chartOfAccountsCode;
112 }
113
114
115
116
117
118
119 public void setChartOfAccountsCode(String chartOfAccountsCode) {
120 this.chartOfAccountsCode = chartOfAccountsCode;
121 }
122
123
124
125
126
127
128
129 public String getOrganizationCode() {
130 return organizationCode;
131 }
132
133
134
135
136
137
138 public void setOrganizationCode(String organizationCode) {
139 this.organizationCode = organizationCode;
140 }
141
142
143
144
145
146
147
148 public String getBudgetReversionChartOfAccountsCode() {
149 return budgetReversionChartOfAccountsCode;
150 }
151
152
153
154
155
156
157 public void setBudgetReversionChartOfAccountsCode(String budgetReversionChartOfAccountsCode) {
158 this.budgetReversionChartOfAccountsCode = budgetReversionChartOfAccountsCode;
159 }
160
161
162
163
164
165
166
167 public String getBudgetReversionAccountNumber() {
168 return budgetReversionAccountNumber;
169 }
170
171
172
173
174
175
176 public void setBudgetReversionAccountNumber(String budgetReversionAccountNumber) {
177 this.budgetReversionAccountNumber = budgetReversionAccountNumber;
178 }
179
180
181
182
183
184
185
186 public boolean isCarryForwardByObjectCodeIndicator() {
187 return carryForwardByObjectCodeIndicator;
188 }
189
190
191
192
193
194
195
196 public void setCarryForwardByObjectCodeIndicator(boolean carryForwardByObjectCodeIndicator) {
197 this.carryForwardByObjectCodeIndicator = carryForwardByObjectCodeIndicator;
198 }
199
200
201
202
203
204
205
206 public String getCashReversionFinancialChartOfAccountsCode() {
207 return cashReversionFinancialChartOfAccountsCode;
208 }
209
210
211
212
213
214
215 public void setCashReversionFinancialChartOfAccountsCode(String cashReversionFinancialChartOfAccountsCode) {
216 this.cashReversionFinancialChartOfAccountsCode = cashReversionFinancialChartOfAccountsCode;
217 }
218
219
220
221
222
223
224
225 public String getCashReversionAccountNumber() {
226 return cashReversionAccountNumber;
227 }
228
229
230
231
232
233
234 public void setCashReversionAccountNumber(String cashReversionAccountNumber) {
235 this.cashReversionAccountNumber = cashReversionAccountNumber;
236 }
237
238
239
240
241
242
243
244 public Chart getChartOfAccounts() {
245 return chartOfAccounts;
246 }
247
248
249
250
251
252
253
254 public void setChartOfAccounts(Chart chartOfAccounts) {
255 this.chartOfAccounts = chartOfAccounts;
256 }
257
258
259
260
261
262
263 public List<Organization> getOrganizations() {
264 return organizations;
265 }
266
267
268
269
270
271
272
273 public void setOrganizations(List<Organization> organization) {
274 this.organizations = organization;
275 }
276
277
278
279
280
281
282 public Account getCashReversionAccount() {
283 return cashReversionAccount;
284 }
285
286
287
288
289
290
291
292 public void setCashReversionAccount(Account cashReversionAccount) {
293 this.cashReversionAccount = cashReversionAccount;
294 }
295
296
297
298
299
300
301 public Account getBudgetReversionAccount() {
302 return budgetReversionAccount;
303 }
304
305
306
307
308
309
310
311 public void setBudgetReversionAccount(Account budgetReversionAccount) {
312 this.budgetReversionAccount = budgetReversionAccount;
313 }
314
315
316
317
318
319
320 public Chart getBudgetReversionChartOfAccounts() {
321 return budgetReversionChartOfAccounts;
322 }
323
324
325
326
327
328
329
330 public void setBudgetReversionChartOfAccounts(Chart budgetReversionChartOfAccounts) {
331 this.budgetReversionChartOfAccounts = budgetReversionChartOfAccounts;
332 }
333
334
335
336
337
338
339 public Chart getCashReversionFinancialChartOfAccounts() {
340 return cashReversionFinancialChartOfAccounts;
341 }
342
343
344
345
346
347
348
349 public void setCashReversionFinancialChartOfAccounts(Chart cashReversionFinancialChartOfAccounts) {
350 this.cashReversionFinancialChartOfAccounts = cashReversionFinancialChartOfAccounts;
351 }
352
353
354
355
356
357
358
359 public SystemOptions getUniversityFiscal() {
360 return universityFiscal;
361 }
362
363
364
365
366
367
368 public void setUniversityFiscal(SystemOptions universityFiscal) {
369 this.universityFiscal = universityFiscal;
370 }
371
372
373
374
375 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
376 LinkedHashMap m = new LinkedHashMap();
377 if (this.universityFiscalYear != null) {
378 m.put("universityFiscalYear", this.universityFiscalYear.toString());
379 }
380 m.put("chartOfAccountsCode", this.chartOfAccountsCode);
381 m.put("organizationCode", this.organizationCode);
382 return m;
383 }
384
385 public Organization getOrganization() {
386 return organization;
387 }
388
389 public void setOrganization(Organization organization) {
390 this.organization = organization;
391 }
392
393
394
395
396
397
398
399 public String getOrganizationReversionViewer() {
400 return "View Organization Reversion";
401 }
402
403
404
405
406
407 public boolean isActive() {
408 return active;
409 }
410
411
412
413
414
415 public void setActive(boolean active) {
416 this.active = active;
417 }
418
419
420
421
422 public String getCashReversionChartCashObjectCode() {
423 if (ObjectUtils.isNull(getCashReversionFinancialChartOfAccounts())) {
424 this.refreshReferenceObject("cashReversionFinancialChartOfAccounts");
425 }
426 if (!ObjectUtils.isNull(getCashReversionFinancialChartOfAccounts())) {
427 return getCashReversionFinancialChartOfAccounts().getFinancialCashObjectCode();
428 } else {
429 return null;
430 }
431 }
432
433
434
435
436 public String getOrganizationChartCashObjectCode() {
437 if (ObjectUtils.isNull(getChartOfAccounts())) {
438 this.refreshReferenceObject("chartOfAccounts");
439 }
440 if (!ObjectUtils.isNull(getChartOfAccounts())) {
441 return getChartOfAccounts().getFinancialCashObjectCode();
442 } else {
443 return null;
444 }
445 }
446 }