View Javadoc
1   /*
2    * Copyright 2006 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  
17  package org.kuali.ole.fp.businessobject;
18  
19  import java.util.LinkedHashMap;
20  
21  import org.kuali.ole.coa.businessobject.Account;
22  import org.kuali.ole.coa.businessobject.Chart;
23  import org.kuali.ole.coa.businessobject.ObjectCodeCurrent;
24  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
25  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
26  
27  /**
28   * This class represents an offset account business object.
29   */
30  public class OffsetAccount extends PersistableBusinessObjectBase implements MutableInactivatable {
31  
32      private String chartOfAccountsCode;
33      private String accountNumber;
34      private String financialOffsetObjectCode;
35      private String financialOffsetChartOfAccountCode;
36      private String financialOffsetAccountNumber;
37      private boolean active;
38  
39      private Chart chart;
40      private Account account;
41      private Chart financialOffsetChartOfAccount;
42      private Account financialOffsetAccount;
43      private ObjectCodeCurrent objectCodeCurrent;
44  
45      /**
46       * Default constructor.
47       */
48      public OffsetAccount() {
49  
50      }
51  
52      /**
53       * Gets the chartOfAccountsCode attribute.
54       * 
55       * @return Returns the chartOfAccountsCode
56       */
57      public String getChartOfAccountsCode() {
58          return chartOfAccountsCode;
59      }
60  
61      /**
62       * Sets the chartOfAccountsCode attribute.
63       * 
64       * @param chartOfAccountsCode The chartOfAccountsCode to set.
65       */
66      public void setChartOfAccountsCode(String chartOfAccountsCode) {
67          this.chartOfAccountsCode = chartOfAccountsCode;
68      }
69  
70  
71      /**
72       * Gets the accountNumber attribute.
73       * 
74       * @return Returns the accountNumber
75       */
76      public String getAccountNumber() {
77          return accountNumber;
78      }
79  
80      /**
81       * Sets the accountNumber attribute.
82       * 
83       * @param accountNumber The accountNumber to set.
84       */
85      public void setAccountNumber(String accountNumber) {
86          this.accountNumber = accountNumber;
87      }
88  
89  
90      /**
91       * Gets the financialOffsetObjectCode attribute.
92       * 
93       * @return Returns the financialOffsetObjectCode
94       */
95      public String getFinancialOffsetObjectCode() {
96          return financialOffsetObjectCode;
97      }
98  
99      /**
100      * Sets the financialOffsetObjectCode attribute.
101      * 
102      * @param financialOffsetObjectCode The financialOffsetObjectCode to set.
103      */
104     public void setFinancialOffsetObjectCode(String financialOffsetObjectCode) {
105         this.financialOffsetObjectCode = financialOffsetObjectCode;
106     }
107 
108 
109     /**
110      * Gets the financialOffsetChartOfAccountCode attribute.
111      * 
112      * @return Returns the financialOffsetChartOfAccountCode
113      */
114     public String getFinancialOffsetChartOfAccountCode() {
115         return financialOffsetChartOfAccountCode;
116     }
117 
118     /**
119      * Sets the financialOffsetChartOfAccountCode attribute.
120      * 
121      * @param financialOffsetChartOfAccountCode The financialOffsetChartOfAccountCode to set.
122      */
123     public void setFinancialOffsetChartOfAccountCode(String financialOffsetChartOfAccountCode) {
124         this.financialOffsetChartOfAccountCode = financialOffsetChartOfAccountCode;
125     }
126 
127 
128     /**
129      * Gets the financialOffsetAccountNumber attribute.
130      * 
131      * @return Returns the financialOffsetAccountNumber
132      */
133     public String getFinancialOffsetAccountNumber() {
134         return financialOffsetAccountNumber;
135     }
136 
137     /**
138      * Sets the financialOffsetAccountNumber attribute.
139      * 
140      * @param financialOffsetAccountNumber The financialOffsetAccountNumber to set.
141      */
142     public void setFinancialOffsetAccountNumber(String financialOffsetAccountNumber) {
143         this.financialOffsetAccountNumber = financialOffsetAccountNumber;
144     }
145 
146 
147     /**
148      * Gets the chart attribute.
149      * 
150      * @return Returns the chart
151      */
152     public Chart getChart() {
153         return chart;
154     }
155 
156     /**
157      * Sets the chart attribute.
158      * 
159      * @param chart The chart to set.
160      * @deprecated
161      */
162     public void setChart(Chart chart) {
163         this.chart = chart;
164     }
165 
166     /**
167      * Gets the account attribute.
168      * 
169      * @return Returns the account
170      */
171     public Account getAccount() {
172         return account;
173     }
174 
175     /**
176      * Sets the account attribute.
177      * 
178      * @param account The account to set.
179      * @deprecated
180      */
181     public void setAccount(Account account) {
182         this.account = account;
183     }
184 
185     /**
186      * Gets the financialOffsetChartOfAccount attribute.
187      * 
188      * @return Returns the financialOffsetChartOfAccount
189      */
190     public Chart getFinancialOffsetChartOfAccount() {
191         return financialOffsetChartOfAccount;
192     }
193 
194     /**
195      * Sets the financialOffsetChartOfAccount attribute.
196      * 
197      * @param financialOffsetChartOfAccount The financialOffsetChartOfAccount to set.
198      * @deprecated
199      */
200     public void setFinancialOffsetChartOfAccount(Chart financialOffsetChartOfAccount) {
201         this.financialOffsetChartOfAccount = financialOffsetChartOfAccount;
202     }
203 
204     /**
205      * @return Returns the financialOffsetAccount.
206      */
207     public Account getFinancialOffsetAccount() {
208         return financialOffsetAccount;
209     }
210 
211     /**
212      * @param financialOffsetAccount The financialOffsetAccount to set.
213      * @deprecated
214      */
215     public void setFinancialOffsetAccount(Account financialOffsetAccount) {
216         this.financialOffsetAccount = financialOffsetAccount;
217     }
218 
219     /**
220      * @return Returns the objectCodeCurrent.
221      */
222     public ObjectCodeCurrent getObjectCodeCurrent() {
223         return objectCodeCurrent;
224     }
225 
226     /**
227      * @param objectCodeCurrent The objectCodeCurrent to set.
228      * @deprecated
229      */
230     public void setObjectCodeCurrent(ObjectCodeCurrent objectCodeCurrent) {
231         this.objectCodeCurrent = objectCodeCurrent;
232     }
233 
234     /**
235      * This method (a hack by any other name...) returns a string so that an offset Account can have a link to view its own
236      * inquiry page after a look up
237      * 
238      * @return the String "View Offset Account"
239      */
240     public String getOffsetAccountViewer() {
241         return "View Offset Account";
242     }
243 
244     /**
245      * @see org.kuali.rice.krad.bo.BusinessObjectBase#toStringMapper()
246      */
247     protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
248         LinkedHashMap m = new LinkedHashMap();
249         m.put("chartOfAccountsCode", this.chartOfAccountsCode);
250         m.put("accountNumber", this.accountNumber);
251         m.put("financialOffsetObjectCode", this.financialOffsetObjectCode);
252         return m;
253     }
254 
255     /**
256      * Gets the active attribute. 
257      * @return Returns the active.
258      */
259     public boolean isActive() {
260         return active;
261     }
262 
263     /**
264      * Sets the active attribute value.
265      * @param active The active to set.
266      */
267     public void setActive(boolean active) {
268         this.active = active;
269     }
270 
271 }