1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.coa.businessobject;
17
18 import java.util.LinkedHashMap;
19 import javax.persistence.Column;
20 import javax.persistence.Convert;
21 import javax.persistence.Entity;
22 import javax.persistence.Id;
23 import javax.persistence.Table;
24 import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
25 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
26 import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;
27
28 @Entity
29 @Table(name = "CA_ACCTG_CTGRY_T")
30 public class BasicAccountingCategory extends PersistableBusinessObjectBase implements MutableInactivatable {
31
32 @Id
33 @Column(name = "ACCTG_CTGRY_CD")
34 private String code;
35
36 @Column(name = "ACCTG_CTGRY_DESC")
37 private String description;
38
39 @Column(name = "ACCTG_CTGRY_SHRT_NM")
40 private String shortName;
41
42 @Column(name = "FIN_REPORT_SORT_CD")
43 private String sortCode;
44
45 @Column(name = "ROW_ACTV_IND")
46 @Convert(converter = BooleanYNConverter.class)
47 private boolean active;
48
49
50
51
52 public BasicAccountingCategory() {
53
54 }
55
56
57
58
59
60
61 public String getCode() {
62 return code;
63 }
64
65
66
67
68
69
70 public void setCode(String basicAccountingCategoryCode) {
71 this.code = basicAccountingCategoryCode;
72 }
73
74
75
76
77
78
79
80 public String getDescription() {
81 return description;
82 }
83
84
85
86
87
88
89 public void setDescription(String accountCategoryDescription) {
90 this.description = accountCategoryDescription;
91 }
92
93
94
95
96
97
98
99 public String getShortName() {
100 return shortName;
101 }
102
103
104
105
106
107
108 public void setShortName(String basicAccountingCategoryShortName) {
109 this.shortName = basicAccountingCategoryShortName;
110 }
111
112
113
114
115
116
117
118 public String getSortCode() {
119 return sortCode;
120 }
121
122
123
124
125
126
127 public void setSortCode(String financialReportingSortCode) {
128 this.sortCode = financialReportingSortCode;
129 }
130
131
132
133
134
135
136 public boolean isActive() {
137 return active;
138 }
139
140
141
142
143
144
145 public void setActive(boolean active) {
146 this.active = active;
147 }
148
149
150
151
152 protected LinkedHashMap toStringMapper() {
153 LinkedHashMap m = new LinkedHashMap();
154 m.put("accountCategoryCode", this.code);
155 return m;
156 }
157
158
159
160
161
162
163 public String getCodeAndDescription() {
164 StringBuilder codeAndDescription = new StringBuilder();
165 codeAndDescription.append(this.getCode());
166 codeAndDescription.append(" - ");
167 codeAndDescription.append(this.getDescription());
168 return codeAndDescription.toString();
169 }
170 }