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