View Javadoc
1   /*
2    * The Kuali Financial System, a comprehensive financial management system for higher education.
3    * 
4    * Copyright 2005-2014 The Kuali Foundation
5    * 
6    * This program is free software: you can redistribute it and/or modify
7    * it under the terms of the GNU Affero General Public License as
8    * published by the Free Software Foundation, either version 3 of the
9    * License, or (at your option) any later version.
10   * 
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Affero General Public License for more details.
15   * 
16   * You should have received a copy of the GNU Affero General Public License
17   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18   */
19  package org.kuali.kfs.module.purap.businessobject;
20  
21  import java.math.BigDecimal;
22  
23  import org.kuali.kfs.sys.businessobject.AccountingLine;
24  import org.kuali.kfs.sys.businessobject.SourceAccountingLine;
25  import org.kuali.rice.core.api.util.type.KualiDecimal;
26  
27  /**
28   * Purap Accounting Line Interface.
29   */
30  public interface PurApAccountingLine extends AccountingLine {
31  
32      public abstract Integer getAccountIdentifier();
33  
34      public abstract void setAccountIdentifier(Integer accountIdentifier);
35  
36      public abstract Integer getItemIdentifier();
37  
38      public abstract void setItemIdentifier(Integer itemIdentifier);
39  
40      public abstract BigDecimal getAccountLinePercent();
41  
42      public abstract void setAccountLinePercent(BigDecimal accountLinePercent);
43  
44      public abstract Integer getSequenceNumber();
45  
46      public abstract void setSequenceNumber(Integer sequenceNumber);
47      
48      public abstract Integer getPurApSequenceNumber();
49      
50      /**
51       * Determines if the current purap accounting line is in an empty state.
52       * 
53       * @return boolean - true if empty state
54       */
55      public abstract boolean isEmpty();
56  
57      /**
58       * Creates a copy of the current purap accounting line and sets the percentage and the amount to zero.
59       * 
60       * @return - purap accounting line copy with blank percent and amount
61       */
62      public abstract PurApAccountingLine createBlankAmountsCopy();
63  
64      /**
65       * Compares the current accounting line values with a source accounting line to see if both accounting lines are equal.
66       * 
67       * @param accountingLine - accounting line to compare
68       * @return boolean - true if passed in and current accounting line are equal, false otherwise
69       */
70      public abstract boolean accountStringsAreEqual(SourceAccountingLine accountingLine);
71  
72      /**
73       * Compares the current accounting line values with a purap accounting line to see if both accounting lines are equal.
74       * 
75       * @param accountingLine - accounting line to compare
76       * @return boolean - true if passed in and current accounting line are equal, false otherwise
77       */
78      public abstract boolean accountStringsAreEqual(PurApAccountingLine accountingLine);
79  
80      /**
81       * Creates a source accounting line from the current purap accounting line.
82       * 
83       * @return - source accounting line based on current purap accounting line
84       */
85      public abstract SourceAccountingLine generateSourceAccountingLine();
86  
87      public KualiDecimal getAlternateAmountForGLEntryCreation();
88  
89      public void setAlternateAmountForGLEntryCreation(KualiDecimal alternateAmountForGLEntryCreation);
90  
91      public <T extends PurApItem> T getPurapItem();
92     
93      public void setPurapItem(PurApItem item);
94      
95      public String getString();
96  
97      public String getPostingPeriodCode();
98  
99      public void setPostingPeriodCode(String postingPeriodCode);
100     
101 }