View Javadoc

1   /**
2    * Copyright 2004-2012 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 SubObjectCode extends PersistableBusinessObjectBase implements Inactivatable {
27  
28      private static final long serialVersionUID = -5292158248714650271L;
29  
30   /*   static {
31          PersistenceStructureServiceImpl.referenceConversionMap.put(SubObjectCode.class, SubObjectCodeCurrent.class);
32      }*/
33  
34      /**
35       * Default no-arg constructor.
36       */
37      public SubObjectCode() {
38  
39      }
40  
41      /**
42       * Constructs an active SubObjCd.java with the given primary key.
43       * 
44       * @param universityFiscalYear
45       * @param chartOfAccountsCode
46       * @param accountNumber
47       * @param financialObjectCode
48       * @param financialSubObjectCode
49       */
50      public SubObjectCode(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, String financialObjectCode, String financialSubObjectCode) {
51          this.universityFiscalYear = universityFiscalYear;
52          this.chartOfAccountsCode = chartOfAccountsCode;
53          this.accountNumber = accountNumber;
54          this.financialObjectCode = financialObjectCode;
55          this.financialSubObjectCode = financialSubObjectCode;
56          this.active = true;
57      }
58  
59      private String chartOfAccountsCode;
60      private String accountNumber;
61      private String financialObjectCode;
62      private String financialSubObjectCode;
63      private String financialSubObjectCodeName;
64      private String financialSubObjectCdshortNm;
65      private boolean active;
66      private Integer universityFiscalYear;
67  
68      private Chart chartOfAccounts;
69      private Account account;
70      private ObjectCode financialObject;
71  
72      public String getFinancialSubObjectCode() {
73          return financialSubObjectCode;
74      }
75  
76      public void setFinancialSubObjectCode(String financialSubObjectCode) {
77          this.financialSubObjectCode = financialSubObjectCode;
78      }
79  
80      /**
81       * Gets the financialObjectCode attribute.
82       * 
83       * @return Returns the financialObjectCode
84       */
85      public String getFinancialObjectCode() {
86          return financialObjectCode;
87      }
88  
89      /**
90       * Sets the financialObjectCode attribute.
91       * 
92       * @param financialObjectCode The financialObjectCode to set.
93       */
94      public void setFinancialObjectCode(String financialObjectCode) {
95          this.financialObjectCode = financialObjectCode;
96      }
97  
98  
99      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 }