1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kfs.coa.businessobject;
17
18 import java.util.LinkedHashMap;
19
20 import org.apache.commons.lang.StringUtils;
21 import org.kuali.rice.core.api.mo.common.active.Inactivatable;
22 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
23
24
25
26
27 public class Chart extends PersistableBusinessObjectBase implements Inactivatable {
28
29 private static final long serialVersionUID = 4129020803214027609L;
30
31 private String finChartOfAccountDescription;
32 private boolean active;
33 private String chartOfAccountsCode;
34
35
36
37
38 public Chart() {
39 }
40
41
42
43
44
45
46 public String getFinChartOfAccountDescription() {
47 return finChartOfAccountDescription;
48 }
49
50
51
52
53
54
55 public void setFinChartOfAccountDescription(String finChartOfAccountDescription) {
56 this.finChartOfAccountDescription = finChartOfAccountDescription;
57 }
58
59
60
61
62
63
64 public boolean isActive() {
65 return active;
66 }
67
68
69
70
71
72
73 public void setActive(boolean active) {
74 this.active = active;
75 }
76
77
78
79
80
81
82 public String getChartOfAccountsCode() {
83 return chartOfAccountsCode;
84 }
85
86
87
88
89
90
91 public void setChartOfAccountsCode(String chartOfAccountsCode) {
92 this.chartOfAccountsCode = chartOfAccountsCode;
93 }
94
95
96
97
98
99 public String getCodeAndDescription() {
100 if (StringUtils.isNotBlank(getChartOfAccountsCode()) && StringUtils.isNotBlank(getFinChartOfAccountDescription()))
101 return getChartOfAccountsCode() + " - " + getFinChartOfAccountDescription();
102 else
103 return "";
104 }
105
106 public String getCode() {
107 return this.chartOfAccountsCode;
108 }
109
110 public String getName() {
111 return this.finChartOfAccountDescription;
112 }
113
114
115
116
117 protected LinkedHashMap toStringMapper() {
118 LinkedHashMap m = new LinkedHashMap();
119
120 m.put("chartOfAccountsCode", this.chartOfAccountsCode);
121
122 return m;
123 }
124 }
125