001 /*
002 * Copyright 2011 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.kfs.sys.businessobject.SystemOptions;
021 import org.kuali.rice.kns.bo.Inactivateable;
022 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
023 import org.kuali.rice.kns.service.impl.PersistenceStructureServiceImpl;
024
025 /**
026 *
027 */
028 public class SubObjectCode extends PersistableBusinessObjectBase implements Inactivateable {
029
030 private static final long serialVersionUID = -5292158248714650271L;
031
032 static {
033 PersistenceStructureServiceImpl.referenceConversionMap.put(SubObjectCode.class, SubObjectCodeCurrent.class);
034 }
035
036 /**
037 * Default no-arg constructor.
038 */
039 public SubObjectCode() {
040
041 }
042
043 /**
044 * Constructs an active SubObjCd.java with the given primary key.
045 *
046 * @param universityFiscalYear
047 * @param chartOfAccountsCode
048 * @param accountNumber
049 * @param financialObjectCode
050 * @param financialSubObjectCode
051 */
052 public SubObjectCode(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, String financialObjectCode, String financialSubObjectCode) {
053 this.universityFiscalYear = universityFiscalYear;
054 this.chartOfAccountsCode = chartOfAccountsCode;
055 this.accountNumber = accountNumber;
056 this.financialObjectCode = financialObjectCode;
057 this.financialSubObjectCode = financialSubObjectCode;
058 this.active = true;
059 }
060
061 private String chartOfAccountsCode;
062 private String accountNumber;
063 private String financialObjectCode;
064 private String financialSubObjectCode;
065 private String financialSubObjectCodeName;
066 private String financialSubObjectCdshortNm;
067 private boolean active;
068 private Integer universityFiscalYear;
069
070 private Chart chartOfAccounts;
071 private Account account;
072 private ObjectCode financialObject;
073 private SystemOptions universityFiscal;
074
075 public String getFinancialSubObjectCode() {
076 return financialSubObjectCode;
077 }
078
079 public void setFinancialSubObjectCode(String financialSubObjectCode) {
080 this.financialSubObjectCode = financialSubObjectCode;
081 }
082
083 /**
084 * Gets the financialObjectCode attribute.
085 *
086 * @return Returns the financialObjectCode
087 */
088 public String getFinancialObjectCode() {
089 return financialObjectCode;
090 }
091
092 /**
093 * Sets the financialObjectCode attribute.
094 *
095 * @param financialObjectCode The financialObjectCode to set.
096 */
097 public void setFinancialObjectCode(String financialObjectCode) {
098 this.financialObjectCode = financialObjectCode;
099 }
100
101
102 public ObjectCode getFinancialObject() {
103 return financialObject;
104 }
105
106 /**
107 * @deprecated
108 */
109 public void setFinancialObject(ObjectCode financialObject) {
110 this.financialObject = financialObject;
111 }
112
113 /**
114 * Gets the financialSubObjectCodeName attribute.
115 *
116 * @return Returns the financialSubObjectCodeName
117 */
118 public String getFinancialSubObjectCodeName() {
119 return financialSubObjectCodeName;
120 }
121
122 /**
123 * Sets the financialSubObjectCodeName attribute.
124 *
125 * @param financialSubObjectCodeName The financialSubObjectCodeName to set.
126 */
127 public void setFinancialSubObjectCodeName(String financialSubObjectCodeName) {
128 this.financialSubObjectCodeName = financialSubObjectCodeName;
129 }
130
131 /**
132 * Gets the financialSubObjectCdshortNm attribute.
133 *
134 * @return Returns the financialSubObjectCdshortNm
135 */
136 public String getFinancialSubObjectCdshortNm() {
137 return financialSubObjectCdshortNm;
138 }
139
140 /**
141 * Sets the financialSubObjectCdshortNm attribute.
142 *
143 * @param financialSubObjectCdshortNm The financialSubObjectCdshortNm to set.
144 */
145 public void setFinancialSubObjectCdshortNm(String financialSubObjectCdshortNm) {
146 this.financialSubObjectCdshortNm = financialSubObjectCdshortNm;
147 }
148
149 /**
150 * Gets the active attribute.
151 *
152 * @return Returns the active
153 */
154 public boolean isActive() {
155 return active;
156 }
157
158 /**
159 * Sets the active attribute.
160 *
161 * @param active The active to set.
162 */
163 public void setActive(boolean active) {
164 this.active = active;
165 }
166
167 /**
168 * Gets the universityFiscal attribute.
169 *
170 * @return Returns the universityFiscal
171 */
172 public SystemOptions getUniversityFiscal() {
173 return universityFiscal;
174 }
175
176 /**
177 * Sets the universityFiscal attribute.
178 *
179 * @param universityFiscal The universityFiscal to set.
180 * @deprecated
181 */
182 public void setUniversityFiscal(SystemOptions universityFiscal) {
183 this.universityFiscal = universityFiscal;
184 }
185
186 /**
187 * Gets the chartOfAccounts attribute.
188 *
189 * @return Returns the chartOfAccounts
190 */
191 public Chart getChartOfAccounts() {
192 return chartOfAccounts;
193 }
194
195 /**
196 * Sets the chartOfAccounts attribute.
197 *
198 * @param chartOfAccounts The chartOfAccounts to set.
199 * @deprecated
200 */
201 public void setChartOfAccounts(Chart chartOfAccounts) {
202 this.chartOfAccounts = chartOfAccounts;
203 }
204
205 /**
206 * Gets the account attribute.
207 *
208 * @return Returns the account
209 */
210 public Account getAccount() {
211 return account;
212 }
213
214 /**
215 * Sets the account attribute.
216 *
217 * @param account The account to set.
218 * @deprecated
219 */
220 public void setAccount(Account account) {
221 this.account = account;
222 }
223
224 public String getAccountNumber() {
225 return accountNumber;
226 }
227
228 public void setAccountNumber(String accountNumber) {
229 this.accountNumber = accountNumber;
230 }
231
232 public String getChartOfAccountsCode() {
233 return chartOfAccountsCode;
234 }
235
236 public void setChartOfAccountsCode(String chartOfAccountsCode) {
237 this.chartOfAccountsCode = chartOfAccountsCode;
238 }
239
240 public Integer getUniversityFiscalYear() {
241 return universityFiscalYear;
242 }
243
244 public void setUniversityFiscalYear(Integer universityFiscalYear) {
245 this.universityFiscalYear = universityFiscalYear;
246 }
247
248 /**
249 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
250 */
251 protected LinkedHashMap toStringMapper() {
252 LinkedHashMap m = new LinkedHashMap();
253
254 m.put("universityFiscalYear", this.universityFiscalYear);
255 m.put("chartOfAccountsCode", this.chartOfAccountsCode);
256 m.put("accountNumber", this.accountNumber);
257 m.put("financialObjectCode", this.financialObjectCode);
258 m.put("financialSubObjectCode", this.financialSubObjectCode);
259
260 return m;
261 }
262
263 }