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.sys.OLEPropertyConstants;
022import org.kuali.rice.core.api.util.type.KualiDecimal;
023import org.kuali.rice.krad.bo.TransientBusinessObjectBase;
024
025/**
026 * This transient business object represents the Capital Accounting Lines
027 * business object that is used by the FP documents.
028 */
029public class CapitalAccountingLines extends TransientBusinessObjectBase {
030    protected String documentNumber;
031    protected Integer sequenceNumber; // relative to the grouping of accounting lines
032    protected String lineType; //tells where source or target line
033    protected String chartOfAccountsCode;
034    protected String accountNumber;
035    protected String financialObjectCode;
036    protected String subAccountNumber;
037    protected String financialSubObjectCode;
038    protected String projectCode;
039    protected String organizationReferenceId;
040    protected String financialDocumentLineDescription;
041    protected KualiDecimal amount;
042    protected boolean selectLine;
043    protected String distributionAmountCode;
044    protected boolean amountDistributed;
045    
046    //need to show the percentage of the accounts.
047    protected KualiDecimal accountLinePercent;
048    
049    /**
050     * Default constructor.
051     */
052    public CapitalAccountingLines() {
053    }
054    
055    /**
056     * Gets the documentNumber attribute.
057     * 
058     * @return Returns the documentNumber
059     */
060    public String getDocumentNumber() {
061        return documentNumber;
062    }
063
064    /**
065     * Sets the documentNumber attribute.
066     * 
067     * @param documentNumber The documentNumber to set.
068     */
069    public void setDocumentNumber(String documentNumber) {
070        this.documentNumber = documentNumber;
071    }
072
073    /**
074     * Gets the sequenceNumber attribute.
075     * 
076     * @return Returns the sequenceNumber
077     */
078    public Integer getSequenceNumber() {
079        return sequenceNumber;
080    }
081
082    /** 
083     * Sets the sequenceNumber attribute.
084     * 
085     * @param sequenceNumber The sequenceNumber to set.
086     */
087    public void setSequenceNumber(Integer sequenceNumber) {
088        this.sequenceNumber = sequenceNumber;
089    }
090
091    /**
092     * Gets the lineType attribute.
093     * 
094     * @return Returns the lineType
095     */
096    public String getLineType() {
097        return lineType;
098    }
099
100    /** 
101     * Sets the lineType attribute.
102     * 
103     * @param lineType The lineType to set.
104     */
105    public void setLineType(String lineType) {
106        this.lineType = lineType;
107    }
108
109    /**
110     * Gets the chartOfAccountsCode attribute.
111     * 
112     * @return Returns the chartOfAccountsCode
113     */
114    public String getChartOfAccountsCode() {
115        return chartOfAccountsCode;
116    }
117
118    /** 
119     * Sets the chartOfAccountsCode attribute.
120     * 
121     * @param chartOfAccountsCode The chartOfAccountsCode to set.
122     */
123    public void setChartOfAccountsCode(String chartOfAccountsCode) {
124        this.chartOfAccountsCode = chartOfAccountsCode;
125    }
126
127    /**
128     * Gets the accountNumber attribute.
129     * 
130     * @return Returns the accountNumber
131     */
132    public String getAccountNumber() {
133        return accountNumber;
134    }
135
136    /** 
137     * Sets the accountNumber attribute.
138     * 
139     * @param accountNumber The accountNumber to set.
140     */
141    public void setAccountNumber(String accountNumber) {
142        this.accountNumber = accountNumber;
143    }
144
145    /**
146     * Gets the financialObjectCode attribute.
147     * 
148     * @return Returns the financialObjectCode
149     */
150    public String getFinancialObjectCode() {
151        return financialObjectCode;
152    }
153
154    /** 
155     * Sets the financialObjectCode attribute.
156     * 
157     * @param financialObjectCode The financialObjectCode to set.
158     */
159    public void setFinancialObjectCode(String financialObjectCode) {
160        this.financialObjectCode = financialObjectCode;
161    }
162
163    /**
164     * Gets the subAccountNumber attribute.
165     * 
166     * @return Returns the subAccountNumber
167     */
168    public String getSubAccountNumber() {
169        return subAccountNumber;
170    }
171
172    /** 
173     * Sets the subAccountNumber attribute.
174     * 
175     * @param subAccountNumber The subAccountNumber to set.
176     */
177    public void setSubAccountNumber(String subAccountNumber) {
178        this.subAccountNumber = subAccountNumber;
179    }
180
181    /**
182     * Gets the financialSubObjectCode attribute.
183     * 
184     * @return Returns the financialSubObjectCode
185     */
186    public String getFinancialSubObjectCode() {
187        return financialSubObjectCode;
188    }
189
190    /** 
191     * Sets the financialSubObjectCode attribute.
192     * 
193     * @param financialSubObjectCode The financialSubObjectCode to set.
194     */
195    public void setFinancialSubObjectCode(String financialSubObjectCode) {
196        this.financialSubObjectCode = financialSubObjectCode;
197    }
198
199    /**
200     * Gets the projectCode attribute.
201     * 
202     * @return Returns the projectCode
203     */
204    public String getProjectCode() {
205        return projectCode;
206    }
207
208    /** 
209     * Sets the projectCode attribute.
210     * 
211     * @param projectCode The projectCode to set.
212     */
213    public void setProjectCode(String projectCode) {
214        this.projectCode = projectCode;
215    }
216    
217    public String getOrganizationReferenceId() {
218        return organizationReferenceId;
219    }
220
221    public void setOrganizationReferenceId(String organizationReferenceId) {
222        this.organizationReferenceId = organizationReferenceId;
223    }
224
225    /**
226     * Gets the financialDocumentLineDescription attribute.
227     * 
228     * @return Returns the financialDocumentLineDescription
229     */
230    public String getFinancialDocumentLineDescription() {
231        return financialDocumentLineDescription;
232    }
233
234    /** 
235     * Sets the financialDocumentLineDescription attribute.
236     * 
237     * @param financialDocumentLineDescription The financialDocumentLineDescription to set.
238     */
239    public void setFinancialDocumentLineDescription(String financialDocumentLineDescription) {
240        this.financialDocumentLineDescription = financialDocumentLineDescription;
241    }
242
243    /**
244     * Gets the amount attribute.
245     * 
246     * @return Returns the amount
247     */
248    public KualiDecimal getAmount() {
249        return amount;
250    }
251
252    /** 
253     * Sets the amount attribute.
254     * 
255     * @param amount The amount to set.
256     */
257    public void setAmount(KualiDecimal amount) {
258        this.amount = amount;
259    }
260
261    /**
262     * Gets the selectLine attribute.
263     * 
264     * @return Returns the selectLine
265     */
266    public boolean isSelectLine() {
267        return selectLine;
268    }
269
270    /** 
271     * Sets the selectLine attribute.
272     * 
273     * @param selectLine The selectLine to set.
274     */
275    public void setSelectLine(boolean selectLine) {
276        this.selectLine = selectLine;
277    }
278
279    /**
280     * Gets the distributionAmountCode attribute.
281     * 
282     * @return Returns the distributionAmountCode
283     */
284    
285    public String getDistributionAmountCode() {
286        return distributionAmountCode;
287    }
288
289    /** 
290     * Sets the distributionAmountCode attribute.
291     * 
292     * @param distributionAmountCode The distributionAmountCode to set.
293     */
294    public void setDistributionAmountCode(String distributionAmountCode) {
295        this.distributionAmountCode = distributionAmountCode;
296    }
297
298    /**
299     * Gets the amountDistributed attribute.
300     * 
301     * @return Returns the amountDistributed
302     */
303    
304    public boolean isAmountDistributed() {
305        return amountDistributed;
306    }
307
308    /** 
309     * Sets the amountDistributed attribute.
310     * 
311     * @param amountDistributed The amountDistributed to set.
312     */
313    public void setAmountDistributed(boolean amountDistributed) {
314        this.amountDistributed = amountDistributed;
315    }
316
317    /**
318     * Gets the accountLinePercent attribute.
319     * 
320     * @return Returns the accountLinePercent
321     */
322    
323    public KualiDecimal getAccountLinePercent() {
324        return accountLinePercent;
325    }
326
327    /** 
328     * Sets the accountLinePercent attribute.
329     * 
330     * @param accountLinePercent The accountLinePercent to set.
331     */
332    public void setAccountLinePercent(KualiDecimal accountLinePercent) {
333        this.accountLinePercent = accountLinePercent;
334    }
335
336    /**
337     * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
338     */
339    
340    public LinkedHashMap toStringMapper_RICE20_REFACTORME() {
341        LinkedHashMap m = new LinkedHashMap();
342        
343        m.put(OLEPropertyConstants.DOCUMENT_NUMBER, this.getDocumentNumber());
344        m.put(OLEPropertyConstants.SEQUENCE_NUMBER, this.getSequenceNumber());
345        m.put(OLEPropertyConstants.LINE_TYPE, this.getLineType());
346        m.put(OLEPropertyConstants.CHART_OF_ACCOUNTS_CODE, this.getChartOfAccountsCode());
347        m.put(OLEPropertyConstants.ACCOUNT_NUMBER, this.getAccountNumber());
348        m.put(OLEPropertyConstants.FINANCIAL_OBJECT_CODE, this.getFinancialObjectCode());
349        m.put(OLEPropertyConstants.SUB_ACCOUNT_NUMBER, this.getSubAccountNumber());
350        m.put(OLEPropertyConstants.FINANCIAL_SUB_OBJECT_CODE, this.getFinancialSubObjectCode());
351        m.put(OLEPropertyConstants.PROJECT_CODE, this.getProjectCode());
352
353  //      m.put(OLEPropertyConstants.FINANCIAL_DOCUMENT_LINE_DESCRIPTION, this.getFinancialDocumentLineDescription());
354  //      m.put(OLEPropertyConstants.AMOUNT, this.getAmount());
355  //      m.put(OLEPropertyConstants.SELECT_LINE, this.isSelectLine());
356  //      m.put(OLEPropertyConstants.DISTRIBUTION_AMOUNT_CODE, this.getDistributionAmountCode());
357  //      m.put(OLEPropertyConstants.AMOUNT_DISTRIBUTED, this.isAmountDistributed());
358  //      m.put(OLEPropertyConstants.ACCOUNT_LINE_PERCENT, this.getAccountLinePercent());
359        
360        return m;
361    }
362}