1 /**
2 * Copyright 2004-2013 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.kfs.coa.businessobject;
17
18 import java.util.LinkedHashMap;
19
20 import org.kuali.rice.core.api.mo.common.active.Inactivatable;
21 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
22
23 /**
24 *
25 */
26 public class SubAccount extends PersistableBusinessObjectBase implements Inactivatable {
27
28 private static final long serialVersionUID = 6853259976912014273L;
29
30 private String chartOfAccountsCode;
31 private String accountNumber;
32 private String subAccountNumber;
33 private String subAccountName;
34 private boolean active;
35 private Account account;
36 private Chart chart;
37 private Organization org;
38
39
40 /**
41 * Default no-arg constructor.
42 */
43 public SubAccount() {
44 }
45
46 /**
47 * Gets the accountNumber attribute.
48 *
49 * @return Returns the accountNumber.
50 */
51 public String getAccountNumber() {
52 return accountNumber;
53 }
54
55 /**
56 * Sets the accountNumber attribute value.
57 */
58 public void setAccountNumber(String accountNumber) {
59 this.accountNumber = accountNumber;
60 }
61
62 /**
63 * Gets the chartOfAccountsCode attribute.
64 *
65 * @return Returns the chartOfAccountsCode.
66 */
67 public String getChartOfAccountsCode() {
68 return chartOfAccountsCode;
69 }
70
71 /**
72 * Sets the chartOfAccountsCode attribute value.
73 *
74 * @param chartOfAccountsCode The chartOfAccountsCode to set.
75 */
76 public void setChartOfAccountsCode(String chartOfAccountsCode) {
77 this.chartOfAccountsCode = chartOfAccountsCode;
78 }
79
80
81 /**
82 * Gets the subAccountName attribute.
83 *
84 * @return Returns the subAccountName
85 */
86 public String getSubAccountName() {
87 return subAccountName;
88 }
89
90 /**
91 * Sets the subAccountName attribute.
92 *
93 * @param subAccountName The subAccountName to set.
94 */
95 public void setSubAccountName(String subAccountName) {
96 this.subAccountName = subAccountName;
97 }
98
99 /**
100 * Gets the active attribute.
101 *
102 * @return Returns the active
103 */
104 public boolean isActive() {
105 return active;
106 }
107
108 /**
109 * Sets the active attribute.
110 *
111 * @param active The active to set.
112 */
113 public void setActive(boolean active) {
114 this.active = active;
115 }
116
117 /**
118 * Gets the account attribute.
119 *
120 * @return Returns the account
121 */
122 public Account getAccount() {
123 return account;
124 }
125
126 /**
127 * Sets the account attribute.
128 *
129 * @param account The account to set.
130 */
131 public void setAccount(Account account) {
132 this.account = account;
133 }
134
135 /**
136 * Gets the subAccount attribute.
137 *
138 * @return Returns the subAccount
139 */
140 public String getSubAccountNumber() {
141 return subAccountNumber;
142 }
143
144 /**
145 * Sets the subAccount attribute.
146 *
147 * @param subAccount The subAccount to set.
148 */
149 public void setSubAccountNumber(String subAccountNumber) {
150 this.subAccountNumber = subAccountNumber;
151 }
152
153
154
155 /**
156 * @return Returns the chart.
157 */
158 public Chart getChart() {
159 return chart;
160 }
161
162 /**
163 * @param chart The chart to set.
164 * @deprecated
165 */
166 public void setChart(Chart chart) {
167 this.chart = chart;
168 }
169
170
171 /**
172 * @return Returns the org.
173 */
174 public Organization getOrg() {
175 return org;
176 }
177
178 /**
179 * @param org The org to set.
180 * @deprecated
181 */
182 public void setOrg(Organization org) {
183 this.org = org;
184 }
185
186 /**
187 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
188 */
189 protected LinkedHashMap toStringMapper() {
190 LinkedHashMap m = new LinkedHashMap();
191 m.put("chartCode", this.chartOfAccountsCode);
192 m.put("account", this.accountNumber);
193 m.put("subAccountNumber", this.subAccountNumber);
194 return m;
195 }
196
197 }