001/*
002 * Copyright 2006 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
017package org.kuali.ole.fp.businessobject;
018
019import java.util.LinkedHashMap;
020
021import org.kuali.ole.coa.businessobject.Account;
022import org.kuali.ole.coa.businessobject.Chart;
023import org.kuali.ole.coa.businessobject.ObjectCodeCurrent;
024import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
025import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
026
027/**
028 * This class represents an offset account business object.
029 */
030public class OffsetAccount extends PersistableBusinessObjectBase implements MutableInactivatable {
031
032    private String chartOfAccountsCode;
033    private String accountNumber;
034    private String financialOffsetObjectCode;
035    private String financialOffsetChartOfAccountCode;
036    private String financialOffsetAccountNumber;
037    private boolean active;
038
039    private Chart chart;
040    private Account account;
041    private Chart financialOffsetChartOfAccount;
042    private Account financialOffsetAccount;
043    private ObjectCodeCurrent objectCodeCurrent;
044
045    /**
046     * Default constructor.
047     */
048    public OffsetAccount() {
049
050    }
051
052    /**
053     * Gets the chartOfAccountsCode attribute.
054     * 
055     * @return Returns the chartOfAccountsCode
056     */
057    public String getChartOfAccountsCode() {
058        return chartOfAccountsCode;
059    }
060
061    /**
062     * Sets the chartOfAccountsCode attribute.
063     * 
064     * @param chartOfAccountsCode The chartOfAccountsCode to set.
065     */
066    public void setChartOfAccountsCode(String chartOfAccountsCode) {
067        this.chartOfAccountsCode = chartOfAccountsCode;
068    }
069
070
071    /**
072     * Gets the accountNumber attribute.
073     * 
074     * @return Returns the accountNumber
075     */
076    public String getAccountNumber() {
077        return accountNumber;
078    }
079
080    /**
081     * Sets the accountNumber attribute.
082     * 
083     * @param accountNumber The accountNumber to set.
084     */
085    public void setAccountNumber(String accountNumber) {
086        this.accountNumber = accountNumber;
087    }
088
089
090    /**
091     * Gets the financialOffsetObjectCode attribute.
092     * 
093     * @return Returns the financialOffsetObjectCode
094     */
095    public String getFinancialOffsetObjectCode() {
096        return financialOffsetObjectCode;
097    }
098
099    /**
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}