View Javadoc
1   /*
2    * Copyright 2005 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.ole.coa.businessobject;
17  
18  import java.util.LinkedHashMap;
19  
20  import org.kuali.ole.sys.businessobject.FiscalYearBasedBusinessObject;
21  import org.kuali.ole.sys.businessobject.SystemOptions;
22  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
23  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24  import org.kuali.rice.krad.service.impl.PersistenceStructureServiceImpl;
25  
26  /**
27   * 
28   */
29  public class SubObjectCode extends PersistableBusinessObjectBase implements MutableInactivatable, FiscalYearBasedBusinessObject {
30  
31      private static final long serialVersionUID = -5292158248714650271L;
32  
33      static {
34          PersistenceStructureServiceImpl.referenceConversionMap.put(SubObjectCode.class, SubObjectCodeCurrent.class);
35      }
36  
37      /**
38       * Default no-arg constructor.
39       */
40      public SubObjectCode() {
41  
42      }
43  
44      /**
45       * Constructs an active SubObjCd.java with the given primary key.
46       * 
47       * @param universityFiscalYear
48       * @param chartOfAccountsCode
49       * @param accountNumber
50       * @param financialObjectCode
51       * @param financialSubObjectCode
52       */
53      public SubObjectCode(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, String financialObjectCode, String financialSubObjectCode) {
54          this.universityFiscalYear = universityFiscalYear;
55          this.chartOfAccountsCode = chartOfAccountsCode;
56          this.accountNumber = accountNumber;
57          this.financialObjectCode = financialObjectCode;
58          this.financialSubObjectCode = financialSubObjectCode;
59          this.active = true;
60      }
61  
62      private String chartOfAccountsCode;
63      private String accountNumber;
64      private String financialObjectCode;
65      private String financialSubObjectCode;
66      private String financialSubObjectCodeName;
67      private String financialSubObjectCdshortNm;
68      private boolean active;
69      private Integer universityFiscalYear;
70  
71      private Chart chartOfAccounts;
72      private Account account;
73      private ObjectCode financialObject;
74      private SystemOptions universityFiscal;
75  
76      public String getFinancialSubObjectCode() {
77          return financialSubObjectCode;
78      }
79  
80      public void setFinancialSubObjectCode(String financialSubObjectCode) {
81          this.financialSubObjectCode = financialSubObjectCode;
82      }
83  
84      /**
85       * Gets the financialObjectCode attribute.
86       * 
87       * @return Returns the financialObjectCode
88       */
89      public String getFinancialObjectCode() {
90          return financialObjectCode;
91      }
92  
93      /**
94       * Sets the financialObjectCode attribute.
95       * 
96       * @param financialObjectCode The financialObjectCode to set.
97       */
98      public void setFinancialObjectCode(String financialObjectCode) {
99          this.financialObjectCode = financialObjectCode;
100     }
101 
102 
103     public ObjectCode getFinancialObject() {
104         return financialObject;
105     }
106 
107     /**
108      * @deprecated
109      */
110     public void setFinancialObject(ObjectCode financialObject) {
111         this.financialObject = financialObject;
112     }
113 
114     /**
115      * Gets the financialSubObjectCodeName attribute.
116      * 
117      * @return Returns the financialSubObjectCodeName
118      */
119     public String getFinancialSubObjectCodeName() {
120         return financialSubObjectCodeName;
121     }
122 
123     /**
124      * Sets the financialSubObjectCodeName attribute.
125      * 
126      * @param financialSubObjectCodeName The financialSubObjectCodeName to set.
127      */
128     public void setFinancialSubObjectCodeName(String financialSubObjectCodeName) {
129         this.financialSubObjectCodeName = financialSubObjectCodeName;
130     }
131 
132     /**
133      * Gets the financialSubObjectCdshortNm attribute.
134      * 
135      * @return Returns the financialSubObjectCdshortNm
136      */
137     public String getFinancialSubObjectCdshortNm() {
138         return financialSubObjectCdshortNm;
139     }
140 
141     /**
142      * Sets the financialSubObjectCdshortNm attribute.
143      * 
144      * @param financialSubObjectCdshortNm The financialSubObjectCdshortNm to set.
145      */
146     public void setFinancialSubObjectCdshortNm(String financialSubObjectCdshortNm) {
147         this.financialSubObjectCdshortNm = financialSubObjectCdshortNm;
148     }
149 
150     /**
151      * Gets the active attribute.
152      * 
153      * @return Returns the active
154      */
155     public boolean isActive() {
156         return active;
157     }
158 
159     /**
160      * Sets the active attribute.
161      * 
162      * @param active The active to set.
163      */
164     public void setActive(boolean active) {
165         this.active = active;
166     }
167 
168     /**
169      * Gets the universityFiscal attribute.
170      * 
171      * @return Returns the universityFiscal
172      */
173     public SystemOptions getUniversityFiscal() {
174         return universityFiscal;
175     }
176 
177     /**
178      * Sets the universityFiscal attribute.
179      * 
180      * @param universityFiscal The universityFiscal to set.
181      * @deprecated
182      */
183     public void setUniversityFiscal(SystemOptions universityFiscal) {
184         this.universityFiscal = universityFiscal;
185     }
186 
187     /**
188      * Gets the chartOfAccounts attribute.
189      * 
190      * @return Returns the chartOfAccounts
191      */
192     public Chart getChartOfAccounts() {
193         return chartOfAccounts;
194     }
195 
196     /**
197      * Sets the chartOfAccounts attribute.
198      * 
199      * @param chartOfAccounts The chartOfAccounts to set.
200      * @deprecated
201      */
202     public void setChartOfAccounts(Chart chartOfAccounts) {
203         this.chartOfAccounts = chartOfAccounts;
204     }
205 
206     /**
207      * Gets the account attribute.
208      * 
209      * @return Returns the account
210      */
211     public Account getAccount() {
212         return account;
213     }
214 
215     /**
216      * Sets the account attribute.
217      * 
218      * @param account The account to set.
219      * @deprecated
220      */
221     public void setAccount(Account account) {
222         this.account = account;
223     }
224 
225     public String getAccountNumber() {
226         return accountNumber;
227     }
228 
229     public void setAccountNumber(String accountNumber) {
230         this.accountNumber = accountNumber;
231     }
232 
233     public String getChartOfAccountsCode() {
234         return chartOfAccountsCode;
235     }
236 
237     public void setChartOfAccountsCode(String chartOfAccountsCode) {
238         this.chartOfAccountsCode = chartOfAccountsCode;
239     }
240 
241     public Integer getUniversityFiscalYear() {
242         return universityFiscalYear;
243     }
244 
245     public void setUniversityFiscalYear(Integer universityFiscalYear) {
246         this.universityFiscalYear = universityFiscalYear;
247     }
248 
249     /**
250      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
251      */
252     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
253         LinkedHashMap m = new LinkedHashMap();
254 
255         m.put("universityFiscalYear", this.universityFiscalYear);
256         m.put("chartOfAccountsCode", this.chartOfAccountsCode);
257         m.put("accountNumber", this.accountNumber);
258         m.put("financialObjectCode", this.financialObjectCode);
259         m.put("financialSubObjectCode", this.financialSubObjectCode);
260 
261         return m;
262     }
263 
264 }