001: /*
002: * Copyright 2006-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.module.gl.dao;
017:
018: import java.util.Iterator;
019: import java.util.List;
020: import java.util.Map;
021:
022: import org.kuali.module.gl.bo.AccountBalance;
023: import org.kuali.module.gl.bo.Transaction;
024:
025: /**
026: * An interface that declares methods needed for AccountBalances to interact with the database
027: */
028: public interface AccountBalanceDao {
029: /**
030: * Given a transaction, finds a matching account balance in the database
031: *
032: * @param t a transaction to find an appropriate related account balance for
033: * @return an appropriate account balance
034: */
035: public AccountBalance getByTransaction(Transaction t);
036:
037: /**
038: * Saves an account balance to the database
039: *
040: * @param ab an account balance to save
041: */
042: public void save(AccountBalance ab);
043:
044: /**
045: * This method finds the available account balances according to input fields and values
046: *
047: * @param fieldValues the input fields and values
048: * @return the summary records of account balance entries
049: */
050: public Iterator findConsolidatedAvailableAccountBalance(
051: Map fieldValues);
052:
053: /**
054: * This method finds the available account balances according to input fields and values
055: *
056: * @param fieldValues the input fields and values
057: * @return account balance entries
058: */
059: public Iterator findAvailableAccountBalance(Map fieldValues);
060:
061: /**
062: * Get available balances by consolidation for specific object types
063: *
064: * @param objectTypes the object types that reported account balances must have
065: * @param universityFiscalYear the university fiscal year of account balances to find
066: * @param chartOfAccountsCode the chart of accounts of account balances to find
067: * @param accountNumber the account number of account balances to find
068: * @param isExcludeCostShare whether cost share entries should be excluded from this inquiry
069: * @param isConsolidated whether the results of this should be consolidated or not
070: * @param pendingEntriesCode whether to include no pending entries, approved pending entries, or all pending entries
071: * @return a List of Maps with the appropriate query results
072: */
073: public List findAccountBalanceByConsolidationByObjectTypes(
074: String[] objectTypes, Integer universityFiscalYear,
075: String chartOfAccountsCode, String accountNumber,
076: boolean isExcludeCostShare, boolean isConsolidated,
077: int pendingEntriesCode);
078:
079: /**
080: * Get available balances by level
081: *
082: * @param universityFiscalYear the university fiscal year of account balances to find
083: * @param chartOfAccountsCode the chart of accounts of account balances to find
084: * @param accountNumber the account number of account balances to find
085: * @param financialConsolidationObjectCode the consolidation code of account balances to find
086: * @param isCostShareExcluded whether cost share entries should be excluded from this inquiry
087: * @param isConsolidated whether the results of this should be consolidated or not
088: * @return a List of Mapswith the appropriate query results
089: */
090: public List findAccountBalanceByLevel(Integer universityFiscalYear,
091: String chartOfAccountsCode, String accountNumber,
092: String financialConsolidationObjectCode,
093: boolean isCostShareExcluded, boolean isConsolidated,
094: int pendingEntryCode);
095:
096: /**
097: * Get available balances by object
098: *
099: * @param universityFiscalYear the university fiscal year of account balances to find
100: * @param chartOfAccountsCode the chart of accounts of account balances to find
101: * @param accountNumber the account number of account balances to find
102: * @param financialObjectLevelCode the object level code of account balances to find
103: * @param financialReportingSortCode
104: * @param isCostShareExcluded whether cost share entries should be excluded from this inquiry
105: * @param isConsolidated whether the results of this should be consolidated or not
106: * @return a List of Maps with the appropriate query results
107: */
108: public List findAccountBalanceByObject(
109: Integer universityFiscalYear, String chartOfAccountsCode,
110: String accountNumber, String financialObjectLevelCode,
111: String financialReportingSortCode,
112: boolean isCostShareExcluded, boolean isConsolidated,
113: int pendingEntryCode);
114:
115: /**
116: * Purge an entire fiscal year for a single chart.
117: *
118: * @param chartOfAccountsCode the chart of accounts code of account balances to purge
119: * @param year the fiscal year of account balances to purge
120: */
121: public void purgeYearByChart(String chartOfAccountscode, int year);
122: }
|