001 /**
002 * Copyright 2004-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.kfs.coa.businessobject;
017
018 import java.util.LinkedHashMap;
019
020 import org.kuali.rice.core.api.mo.common.active.Inactivatable;
021 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
022
023 /**
024 *
025 */
026 public class SubAccount extends PersistableBusinessObjectBase implements Inactivatable {
027
028 private static final long serialVersionUID = 6853259976912014273L;
029
030 private String chartOfAccountsCode;
031 private String accountNumber;
032 private String subAccountNumber;
033 private String subAccountName;
034 private boolean active;
035 private Account account;
036 private Chart chart;
037 private Organization org;
038
039
040 /**
041 * Default no-arg constructor.
042 */
043 public SubAccount() {
044 }
045
046 /**
047 * Gets the accountNumber attribute.
048 *
049 * @return Returns the accountNumber.
050 */
051 public String getAccountNumber() {
052 return accountNumber;
053 }
054
055 /**
056 * Sets the accountNumber attribute value.
057 */
058 public void setAccountNumber(String accountNumber) {
059 this.accountNumber = accountNumber;
060 }
061
062 /**
063 * Gets the chartOfAccountsCode attribute.
064 *
065 * @return Returns the chartOfAccountsCode.
066 */
067 public String getChartOfAccountsCode() {
068 return chartOfAccountsCode;
069 }
070
071 /**
072 * Sets the chartOfAccountsCode attribute value.
073 *
074 * @param chartOfAccountsCode The chartOfAccountsCode to set.
075 */
076 public void setChartOfAccountsCode(String chartOfAccountsCode) {
077 this.chartOfAccountsCode = chartOfAccountsCode;
078 }
079
080
081 /**
082 * Gets the subAccountName attribute.
083 *
084 * @return Returns the subAccountName
085 */
086 public String getSubAccountName() {
087 return subAccountName;
088 }
089
090 /**
091 * Sets the subAccountName attribute.
092 *
093 * @param subAccountName The subAccountName to set.
094 */
095 public void setSubAccountName(String subAccountName) {
096 this.subAccountName = subAccountName;
097 }
098
099 /**
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 }