001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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: package org.kuali.kfs.dao;
017:
018: import java.util.Collection;
019: import java.util.Iterator;
020: import java.util.Map;
021:
022: import org.kuali.core.util.KualiDecimal;
023: import org.kuali.kfs.bo.GeneralLedgerPendingEntry;
024: import org.kuali.module.chart.bo.Account;
025: import org.kuali.module.gl.bo.Balance;
026: import org.kuali.module.gl.bo.Encumbrance;
027:
028: /**
029: * This interface defines basic methods that GeneralLedgerPendingEntry Dao's must provide
030: */
031: public interface GeneralLedgerPendingEntryDao {
032:
033: /**
034: * Get summary of amounts in the pending entry table
035: *
036: * @param universityFiscalYear
037: * @param chartOfAccountsCode
038: * @param accountNumber
039: * @param objectCodes
040: * @param balanceTypeCodes
041: * @param isDebit
042: * @return
043: */
044: public KualiDecimal getTransactionSummary(
045: Collection universityFiscalYears,
046: String chartOfAccountsCode, String accountNumber,
047: Collection objectCodes, Collection balanceTypeCodes,
048: boolean isDebit);
049:
050: /**
051: * Get summary of amounts in the pending entry table
052: *
053: * @param universityFiscalYear
054: * @param chartOfAccountsCode
055: * @param accountNumber
056: * @param objectTypeCodes
057: * @param balanceTypeCodes
058: * @param acctSufficientFundsFinObjCd
059: * @param isDebit
060: * @param isYearEnd
061: * @return
062: */
063: public KualiDecimal getTransactionSummary(
064: Integer universityFiscalYear, String chartOfAccountsCode,
065: String accountNumber, Collection objectTypeCodes,
066: Collection balanceTypeCodes,
067: String acctSufficientFundsFinObjCd, boolean isDebit,
068: boolean isYearEnd);
069:
070: /**
071: * Get summary of amounts in the pending entry table
072: *
073: * @param universityFiscalYear
074: * @param chartOfAccountsCode
075: * @param accountNumber
076: * @param objectTypeCodes
077: * @param balanceTypeCodes
078: * @param acctSufficientFundsFinObjCd
079: * @param isYearEnd
080: * @return
081: */
082: public KualiDecimal getTransactionSummary(
083: Integer universityFiscalYear, String chartOfAccountsCode,
084: String accountNumber, Collection objectTypeCodes,
085: Collection balanceTypeCodes,
086: String acctSufficientFundsFinObjCd, boolean isYearEnd);
087:
088: /**
089: * Find Pending Entries
090: *
091: * @param fieldValues
092: * @param isApproved
093: * @return
094: */
095: public Collection findPendingEntries(Map fieldValues,
096: boolean isApproved);
097:
098: /**
099: * @param documentHeaderId
100: * @param transactionLedgerEntrySequenceNumber
101: * @return a pending ledger entry
102: */
103: public GeneralLedgerPendingEntry getByPrimaryId(
104: String documentHeaderId,
105: Integer transactionLedgerEntrySequenceNumber);
106:
107: /**
108: * @param generalLedgerPendingEntry
109: */
110: public void save(GeneralLedgerPendingEntry generalLedgerPendingEntry);
111:
112: /**
113: * Delete all pending entries for a given document
114: *
115: * @param documentHeaderId
116: */
117: public void delete(String documentHeaderId);
118:
119: /**
120: * Delete all pending entries based on the document approved code
121: *
122: * @param financialDocumentApprovedCode
123: */
124: public void deleteByFinancialDocumentApprovedCode(
125: String financialDocumentApprovedCode);
126:
127: /**
128: * This method retrieves all approved pending ledger entries
129: *
130: * @return all approved pending ledger entries
131: */
132: public Iterator findApprovedPendingLedgerEntries();
133:
134: /**
135: * This method counts all approved pending ledger entries by account
136: *
137: * @param account the given account
138: * @return count of entries
139: */
140: public int countPendingLedgerEntries(Account account);
141:
142: /**
143: * This method retrieves all pending ledger entries for the given encumbrance
144: *
145: * @param encumbrance the encumbrance entry in the GL_Encumbrance_T table
146: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
147: * @return all pending ledger entries of the given encumbrance
148: */
149: public Iterator findPendingLedgerEntries(Encumbrance encumbrance,
150: boolean isApproved);
151:
152: /**
153: * This method retrieves all pending ledger entries for the given encumbrance
154: *
155: * @param balance the balance entry
156: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
157: * @param isConsolidated consolidation option is applied or not
158: * @return all pending ledger entries of the given balance
159: */
160: public Iterator findPendingLedgerEntries(Balance balance,
161: boolean isApproved, boolean isConsolidated);
162:
163: /**
164: * This method retrieves all pending ledger entries matching the given entry criteria
165: *
166: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
167: * @param fieldValues the input fields and values
168: * @return all pending ledger entries matching the given balance criteria
169: */
170: public Iterator findPendingLedgerEntriesForEntry(Map fieldValues,
171: boolean isApproved);
172:
173: /**
174: * This method retrieves all pending ledger entries matching the given balance criteria
175: *
176: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
177: * @param fieldValues the input fields and values
178: * @return all pending ledger entries matching the given balance criteria
179: */
180: public Iterator findPendingLedgerEntriesForBalance(Map fieldValues,
181: boolean isApproved);
182:
183: /**
184: * This method retrieves all pending ledger entries matching the given cash balance criteria
185: *
186: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
187: * @param fieldValues the input fields and values
188: * @return all pending ledger entries matching the given cash balance criteria
189: */
190: public Iterator findPendingLedgerEntriesForCashBalance(
191: Map fieldValues, boolean isApproved);
192:
193: /**
194: * This method retrieves all pending ledger entries that may belong to encumbrance table in the future
195: *
196: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
197: * @param fieldValues the input fields and values
198: * @return all pending ledger entries that may belong to encumbrance table
199: */
200: public Iterator findPendingLedgerEntriesForEncumbrance(
201: Map fieldValues, boolean isApproved);
202:
203: /**
204: * This method retrieves all pending ledger entries that may belong to the given account balance record in the future
205: *
206: * @param fieldValues the input fields and values
207: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
208: * @return all pending ledger entries that may belong to encumbrance table
209: */
210: public Iterator findPendingLedgerEntrySummaryForAccountBalance(
211: Map fieldValues, boolean isApproved);
212:
213: /**
214: * This method retrieves all pending ledger entries that may belong to the given account balance record in the future
215: *
216: * @param fieldValues the input fields and values
217: * @param isApproved the flag that indicates whether the pending entries are approved or don't care
218: * @return all pending ledger entries that may belong to encumbrance table
219: */
220: public Iterator findPendingLedgerEntriesForAccountBalance(
221: Map fieldValues, boolean isApproved);
222:
223: }
|