View Javadoc
1   /*
2    * Copyright 2007 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.sys.businessobject;
17  
18  import java.util.Map;
19  
20  import org.kuali.ole.coa.businessobject.Account;
21  import org.kuali.ole.coa.businessobject.BalanceType;
22  import org.kuali.ole.coa.businessobject.Chart;
23  import org.kuali.ole.coa.businessobject.ObjectCode;
24  import org.kuali.ole.coa.businessobject.ObjectType;
25  import org.kuali.ole.coa.businessobject.ProjectCode;
26  import org.kuali.ole.coa.businessobject.SubAccount;
27  import org.kuali.ole.coa.businessobject.SubObjectCode;
28  import org.kuali.ole.fp.businessobject.SalesTax;
29  import org.kuali.rice.core.api.util.type.KualiDecimal;
30  import org.kuali.rice.kew.doctype.bo.DocumentTypeEBO;
31  import org.kuali.rice.krad.bo.PersistableBusinessObject;
32  
33  /**
34   * An AccountLine contains all the accounting items typically necessary to create a pending entry to the G/L. All transaction
35   * documents will use this business object inherently. Specific accounting line business rules should exist not in this
36   * implementation, but rather in the document business object that uses it.
37   */
38  public interface AccountingLine extends PersistableBusinessObject, GeneralLedgerPendingEntrySourceDetail {
39  
40      /**
41       * @param account The account to set.
42       * @deprecated
43       */
44      public void setAccount(Account account);
45  
46      /**
47       * @return Returns the chartOfAccountsCode.
48       */
49      public Chart getChart();
50  
51      /**
52       * @param chart The chartOfAccountsCode to set.
53       * @deprecated
54       */
55      public void setChart(Chart chart);
56  
57      /**
58       * @param amount The amount to set.
59       */
60      public void setAmount(KualiDecimal amount);
61  
62      /**
63       * @return Returns the balanceTyp.
64       */
65      public BalanceType getBalanceTyp();
66  
67      /**
68       * @param balanceTyp The balanceTyp to set.
69       * @deprecated
70       */
71      public void setBalanceTyp(BalanceType balanceTyp);
72  
73      /**
74       * @param objectCode The objectCode to set.
75       * @deprecated
76       */
77      public void setObjectCode(ObjectCode objectCode);
78  
79      /**
80       * @param originCode The referenceOriginCode to set.
81       */
82      public void setReferenceOriginCode(String originCode);
83  
84      /**
85       * This method returns the object related to referenceOriginCode
86       * 
87       * @return referenceOrigin
88       */
89      public OriginationCode getReferenceOrigin();
90  
91      /**
92       * This method sets the referenceOrigin object, this is only to be used by OJB
93       * 
94       * @param referenceOrigin
95       * @deprecated
96       */
97      public void setReferenceOrigin(OriginationCode referenceOrigin);
98  
99      /**
100      * Gets the referenceFinancialSystemDocumentTypeCode attribute.
101      *  
102      * @return Returns the referenceFinancialSystemDocumentTypeCode.
103      */
104     public DocumentTypeEBO getReferenceFinancialSystemDocumentTypeCode();
105 
106     /**
107      * @param organizationReferenceId The organizationReferenceId to set.
108      */
109     public void setOrganizationReferenceId(String organizationReferenceId);
110 
111     /**
112      * @return Returns the overrideCode.
113      */
114     public String getOverrideCode();
115 
116     /**
117      * @param overrideCode The overrideCode to set.
118      */
119     public void setOverrideCode(String overrideCode);
120 
121     /**
122      * @param postingYear The postingYear to set.
123      */
124     public void setPostingYear(Integer postingYear);
125 
126     /**
127      * @param projectCode The projectCode to set.
128      */
129     public void setProjectCode(String projectCode);
130 
131     /**
132      * @param referenceNumber The referenceNumber to set.
133      */
134     public void setReferenceNumber(String referenceNumber);
135 
136     /**
137      * @param referenceTypeCode The referenceTypeCode to set.
138      */
139     public void setReferenceTypeCode(String referenceTypeCode);
140 
141     /**
142      * @return Returns the sequenceNumber.
143      */
144     public Integer getSequenceNumber();
145 
146     /**
147      * @param sequenceNumber The sequenceNumber to set.
148      */
149     public void setSequenceNumber(Integer sequenceNumber);
150 
151     /**
152      * @return Returns the subAccount.
153      */
154     public SubAccount getSubAccount();
155 
156     /**
157      * @param subAccount The subAccount to set.
158      * @deprecated
159      */
160     public void setSubAccount(SubAccount subAccount);
161 
162     /**
163      * @return Returns the subObjectCode.
164      */
165     public SubObjectCode getSubObjectCode();
166 
167     /**
168      * @param subObjectCode The subObjectCode to set.
169      * @deprecated
170      */
171     public void setSubObjectCode(SubObjectCode subObjectCode);
172 
173     /**
174      * @param documentNumber The documentNumber to set.
175      */
176     public void setDocumentNumber(String documentNumber);
177 
178     /**
179      * This method retrieves the debit/credit code for the accounting line. This method will only return a not null value for a
180      * Journal Voucher document.
181      * 
182      * @return A String code.
183      */
184     public String getDebitCreditCode();
185 
186     /**
187      * This method sets the debit/credit code for the accounting line. This method should only be used for a Journal Voucher
188      * document.
189      * 
190      * @param debitCreditCode
191      */
192     public void setDebitCreditCode(String debitCreditCode);
193 
194     /**
195      * This method retrieves the encumbrance update code for the accounting line. This method will only return a not null value for
196      * a Journal Voucher document.
197      * 
198      * @return A String code.
199      */
200     public String getEncumbranceUpdateCode();
201 
202     /**
203      * This method sets the debit/credit code for the accounting line. This method should only be used for a Journal Voucher
204      * document.
205      * 
206      * @param encumbranceUpdateCode
207      */
208     public void setEncumbranceUpdateCode(String encumbranceUpdateCode);
209 
210     /**
211      * This method retrieves the ObjectType for the accounting line. This method will only return a not null value for a Journal
212      * Voucher document.
213      * 
214      * @return An ObjectType instance.
215      */
216     public ObjectType getObjectType();
217 
218     /**
219      * @param accountNumber The accountNumber to set.
220      */
221     public void setAccountNumber(String accountNumber);
222 
223     /**
224      * @param balanceTypeCode The balanceTypeCode to set.
225      */
226     public void setBalanceTypeCode(String balanceTypeCode);
227 
228     /**
229      * @param chartOfAccountsCode The chartOfAccountsCode to set.
230      */
231     public void setChartOfAccountsCode(String chartOfAccountsCode);
232 
233     /**
234      * @param financialObjectCode The financialObjectCode to set.
235      */
236     public void setFinancialObjectCode(String financialObjectCode);
237 
238     /**
239      * @param financialSubObjectCode The financialSubObjectCode to set.
240      */
241     public void setFinancialSubObjectCode(String financialSubObjectCode);
242 
243     /**
244      * @return Returns the objectTypeCode.
245      */
246     public String getObjectTypeCode();
247 
248     /**
249      * @return Returns the financialDocumentLineTypeCode.
250      */
251     public String getFinancialDocumentLineTypeCode();
252 
253     /**
254      * @param financialDocumentLineTypeCode The financialDocumentLineTypeCode to set.
255      */
256     public void setFinancialDocumentLineTypeCode(String financialDocumentLineTypeCode);
257 
258     /**
259      * @return Returns the project.
260      */
261     public ProjectCode getProject();
262 
263     /**
264      * @param project The project to set.
265      * @deprecated
266      */
267     public void setProject(ProjectCode project);
268 
269     /**
270      * @param subAccountNumber The subAccountNumber to set.
271      */
272     public void setSubAccountNumber(String subAccountNumber);
273 
274     /**
275      * @param financialDocumentLineDescription The financialDocumentLineDescription to set.
276      */
277     public abstract void setFinancialDocumentLineDescription(String financialDocumentLineDescription);
278 
279     /**
280      * @return the sales tax associated with this line if any
281      */
282     public abstract SalesTax getSalesTax();
283 
284     /**
285      * @param salesTax The sales tax associated with this AccountingLine
286      */
287     public abstract void setSalesTax(SalesTax salesTax);
288 
289     /**
290      * This method checks to see if sales tax is required for this accounting line or not
291      * 
292      * @return true if it is required, false otherwise
293      */
294     public boolean isSalesTaxRequired();
295 
296     /**
297      * You can set whether or not sales tax is required for this accounting line or not
298      * 
299      * @param salesTaxRequired - true if required
300      */
301     public void setSalesTaxRequired(boolean salesTaxRequired);
302 
303     /**
304      * @see org.kuali.rice.krad.bo.AccountingLine#isSourceAccountingLine()
305      */
306     public boolean isSourceAccountingLine();
307 
308     /**
309      * @see org.kuali.rice.krad.bo.AccountingLine#isTargetAccountingLine()
310      */
311     public boolean isTargetAccountingLine();
312 
313     /**
314      * @param other
315      * @return true if this AccountingLine has the same primitive field values as the given one
316      */
317     public boolean isLike(AccountingLine other);
318 
319     /**
320      * Overwrites the fields of this AccountingLine with the values of the corresponding fields of the given AccountingLine.
321      * Reference field values are in this instance are overwritten with deepCopies of the reference fields of the given
322      * AccountingLine.
323      * 
324      * @param other
325      */
326     public void copyFrom(AccountingLine other);
327 
328     /**
329      * Convenience method to make the primitive account fields from this AccountingLine easier to compare to the account fields of
330      * another AccountingLine or of an Account
331      * 
332      * @return String representing the account associated with this AccountingLine
333      */
334     public String getAccountKey();
335 
336     /**
337      * This indicates the account expired component of this AccountingLine's overrideCode. It provides a DataDictionary attribute
338      * for the UI, but is not persisted itself.
339      * 
340      * @return accountExpiredOverride
341      */
342     boolean getAccountExpiredOverride();
343 
344     /**
345      * @see #getAccountExpiredOverride()
346      * @param b the accountExpiredOverride to set
347      */
348     public void setAccountExpiredOverride(boolean b);
349 
350     /**
351      * This indicates the account expired override is needed (because this AccountingLine's Account is expired). It tells the UI to
352      * display the accountExpiredOverride attribute, but is not persisted itself.
353      * 
354      * @return accountExpiredOverride
355      */
356     public boolean getAccountExpiredOverrideNeeded();
357 
358     /**
359      * @see #getAccountExpiredOverrideNeeded()
360      * @param b the accountExpiredOverrideNeeded to set
361      */
362     public void setAccountExpiredOverrideNeeded(boolean b);
363 
364     /**
365      * This indicates the object budget component of this AccountingLine's overrideCode. It provides a DataDictionary attribute for
366      * the UI, but is not persisted itself.
367      * 
368      * @return objectBudgetOverride
369      */
370     public boolean isObjectBudgetOverride();
371 
372     /**
373      * @see #isObjectBudgetOverride()
374      * @param b the objectBudgetOverride to set
375      */
376     public void setObjectBudgetOverride(boolean b);
377 
378     /**
379      * This indicates the object budget override is needed (because this AccountingLine's Account is expired). It tells the UI to
380      * display the objectBudgetOverride attribute, but is not persisted itself.
381      * 
382      * @return boolean
383      */
384     public boolean isObjectBudgetOverrideNeeded();
385 
386     /**
387      * @see #isObjectBudgetOverrideNeeded()
388      * @param b the objectBudgetOverride to set
389      */
390     public void setObjectBudgetOverrideNeeded(boolean b);
391 
392     /**
393      * Gets the nonFringeAccountOverride attribute.
394      * 
395      * @return Returns the nonFringeAccountOverride.
396      */
397     public boolean getNonFringeAccountOverride();
398 
399     /**
400      * Sets the nonFringeAccountOverride attribute value.
401      * 
402      * @param nonFringeAccountOverride The nonFringeAccountOverride to set.
403      */
404     public void setNonFringeAccountOverride(boolean nonFringeAccountOverride);
405 
406     /**
407      * Gets the nonFringeAccountOverrideNeeded attribute.
408      * 
409      * @return Returns the nonFringeAccountOverrideNeeded.
410      */
411     public boolean getNonFringeAccountOverrideNeeded();
412 
413     /**
414      * Sets the nonFringeAccountOverrideNeeded attribute value.
415      * 
416      * @param nonFringeAccountOverrideNeeded The nonFringeAccountOverrideNeeded to set.
417      */
418     public void setNonFringeAccountOverrideNeeded(boolean nonFringeAccountOverrideNeeded);
419 
420     /**
421      * Returns a Map with the accounting line primitive field names as the key of the map and the primitive values as the value.
422      * 
423      * @return Map
424      */
425     public Map getValuesMap();
426 }