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.dataaccess;
17  
18  import java.util.Collection;
19  import java.util.Iterator;
20  import java.util.List;
21  import java.util.Map;
22  
23  import org.kuali.ole.coa.businessobject.Account;
24  import org.kuali.ole.gl.businessobject.Balance;
25  import org.kuali.ole.gl.businessobject.Encumbrance;
26  import org.kuali.ole.sys.businessobject.SystemOptions;
27  import org.kuali.rice.core.api.util.type.KualiDecimal;
28  
29  /**
30   * This interface defines basic methods that GeneralLedgerPendingEntry Dao's must provide
31   */
32  public interface GeneralLedgerPendingEntryDao {
33  
34      /**
35       * Get summary of amounts in the pending entry table
36       * 
37       * @param universityFiscalYear
38       * @param chartOfAccountsCode
39       * @param accountNumber
40       * @param objectCodes
41       * @param balanceTypeCodes
42       * @param isDebit
43       * @return
44       */
45      public KualiDecimal getTransactionSummary(Collection universityFiscalYears, String chartOfAccountsCode, String accountNumber, Collection objectCodes, Collection balanceTypeCodes, boolean isDebit);
46  
47      /**
48       * Get summary of amounts in the pending entry table
49       * 
50       * @param universityFiscalYear
51       * @param chartOfAccountsCode
52       * @param accountNumber
53       * @param objectTypeCodes
54       * @param balanceTypeCodes
55       * @param acctSufficientFundsFinObjCd
56       * @param isDebit
57       * @param isYearEnd
58       * @return
59       */
60      public KualiDecimal getTransactionSummary(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, Collection objectTypeCodes, Collection balanceTypeCodes, String acctSufficientFundsFinObjCd, boolean isDebit, boolean isYearEnd);
61  
62      /**
63       * Get summary of amounts in the pending entry table
64       * 
65       * @param universityFiscalYear
66       * @param chartOfAccountsCode
67       * @param accountNumber
68       * @param objectTypeCodes
69       * @param balanceTypeCodes
70       * @param acctSufficientFundsFinObjCd
71       * @param isYearEnd
72       * @return
73       */
74      public KualiDecimal getTransactionSummary(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, Collection objectTypeCodes, Collection balanceTypeCodes, String acctSufficientFundsFinObjCd, boolean isYearEnd);
75  
76      /**
77       * Find Pending Entries
78       * 
79       * @param fieldValues
80       * @param isApproved
81       * @param currentFiscalPeriodCode
82       * @param currentFiscalYear
83       * @param encumbranceBalanceTypes a list of encumbranceBalanceTypes for the given universityFiscalYear if this is passed in the
84       *        fieldValues or the Current Year Encumbrance Balance Types if universityFiscalYear is not present
85       * @return
86       */
87      public Collection findPendingEntries(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFiscalYear, List<String> encumbranceBalanceTypes);
88  
89      /**
90       * Delete all pending entries for a given document
91       * 
92       * @param documentHeaderId
93       */
94      public void delete(String documentHeaderId);
95  
96      /**
97       * Delete all pending entries based on the document approved code
98       * 
99       * @param financialDocumentApprovedCode
100      */
101     public void deleteByFinancialDocumentApprovedCode(String financialDocumentApprovedCode);
102 
103     /**
104      * This method retrieves all approved pending ledger entries
105      * 
106      * @return all approved pending ledger entries
107      */
108     public Iterator findApprovedPendingLedgerEntries();
109 
110     /**
111      * This method counts all approved pending ledger entries by account
112      * 
113      * @param account the given account
114      * @return count of entries
115      */
116     public int countPendingLedgerEntries(Account account);
117 
118     /**
119      * This method retrieves all pending ledger entries for the given encumbrance
120      * 
121      * @param encumbrance the encumbrance entry in the GL_Encumbrance_T table
122      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
123      * @return all pending ledger entries of the given encumbrance
124      */
125     public Iterator findPendingLedgerEntries(Encumbrance encumbrance, boolean isApproved);
126 
127     /**
128      * This method retrieves all pending ledger entries for the given encumbrance
129      * 
130      * @param balance the balance entry
131      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
132      * @param isConsolidated consolidation option is applied or not
133      * @return all pending ledger entries of the given balance
134      */
135     public Iterator findPendingLedgerEntries(Balance balance, boolean isApproved, boolean isConsolidated);
136 
137     /**
138      * This method retrieves all pending ledger entries matching the given entry criteria
139      * 
140      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
141      * @param fieldValues the input fields and values
142      * @param currentFiscalPeriodCode current fiscal year period code
143      * @param currentFY current fiscal year
144      * @param encumbranceBalanceTypes a list of encumbranceBalanceTypes
145      * @return all pending ledger entries matching the given balance criteria
146      */
147     public Iterator findPendingLedgerEntriesForEntry(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFY, List<String> encumbranceBalanceTypes);
148 
149     /**
150      * This method retrieves all pending ledger entries matching the given balance criteria
151      * 
152      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
153      * @param fieldValues the input fields and values
154      * @param currentFiscalPeriodCode current fiscal year period code
155      * @param currentFY current fiscal year
156      * @param encumbranceBalanceTypes a list of encumbranceBalanceTypes
157      * @return all pending ledger entries matching the given balance criteria
158      */
159     public Iterator findPendingLedgerEntriesForBalance(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFY, List<String> encumbranceBalanceTypes);
160 
161     /**
162      * This method retrieves all pending ledger entries matching the given cash balance criteria
163      * 
164      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
165      * @param fieldValues the input fields and values
166      * @param currentFiscalPeriodCode current fiscal year period code
167      * @param currentFY current fiscal year
168      * @param encumbranceBalanceTypes a list of encumbranceBalanceTypes for the given universityFiscalYear if this is passed in the
169      *        fieldValues or the Current Year Encumbrance Balance Types if universityFiscalYear is not present
170      * @return all pending ledger entries matching the given cash balance criteria
171      */
172     public Iterator findPendingLedgerEntriesForCashBalance(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFY, List<String> encumbranceBalanceTypes);
173 
174     /**
175      * This method retrieves all pending ledger entries that may belong to encumbrance table in the future
176      * 
177      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
178      * @param fieldValues the input fields and values
179      * @param currentFiscalPeriodCode current fiscal year period code
180      * @param currentFY current fiscal year
181      * @param currentYearOptions the current year system options
182      * @param encumbranceBalanceTypes a list of encumbranceBalanceTypes for the given universityFiscalYear if this is passed in the
183      *        fieldValues or the Current Year Encumbrance Balance Types if universityFiscalYear is not present
184      * @return all pending ledger entries that may belong to encumbrance table
185      */
186     public Iterator findPendingLedgerEntriesForEncumbrance(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFiscalYear, SystemOptions currentYearOptions, List<String> encumbranceBalanceTypes);
187 
188     /**
189      * This method retrieves all pending ledger entries that may belong to the given account balance record in the future
190      * 
191      * @param fieldValues the input fields and values
192      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
193      * @param currentFiscalPeriodCode current fiscal year period code
194      * @param currentFY current fiscal year
195      * @param encumbranceBalanceTypes a list of encumbranceBalanceTypes for the given universityFiscalYear if this is passed in the
196      *        fieldValues or the Current Year Encumbrance Balance Types if universityFiscalYear is not present
197      * @return all pending ledger entries that may belong to encumbrance table
198      */
199     public Iterator findPendingLedgerEntrySummaryForAccountBalance(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFiscalYear, List<String> encumbranceBalanceTypes);
200 
201     /**
202      * This method retrieves all pending ledger entries that may belong to the given account balance record in the future
203      * 
204      * @param fieldValues the input fields and values
205      * @param isApproved the flag that indicates whether the pending entries are approved or don't care
206      * @param currentFiscalPeriodCode current fiscal year period code
207      * @param currentFY current fiscal year
208      * @param encumbranceBalanceTypes a list of encumbranceBalanceTypes for the given universityFiscalYear if this is passed in the
209      *        fieldValues or the Current Year Encumbrance Balance Types if universityFiscalYear is not present
210      * @return all pending ledger entries that may belong to encumbrance table
211      */
212     public Iterator findPendingLedgerEntriesForAccountBalance(Map fieldValues, boolean isApproved, String currentFiscalPeriodCode, int currentFiscalYear, List<String> encumbranceBalanceTypes);
213 
214 }