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.service;
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:
024: /**
025: * This interface delcares methods useful for dealing with AccountBalance objects.
026: */
027: public interface AccountBalanceService {
028: public final int PENDING_NONE = 1;
029: public final int PENDING_APPROVED = 2;
030: public final int PENDING_ALL = 3;
031:
032: /**
033: * This method finds the available account balances according to input fields and values
034: *
035: * @param fieldValues the input fields and values
036: * @return the summary records of account balance entries
037: */
038: public Iterator findConsolidatedAvailableAccountBalance(
039: Map fieldValues);
040:
041: /**
042: * This method gets the number of the available account balances according to input fields and values
043: *
044: * @param fieldValues the input fields and values
045: * @param isConsolidated determine whether the search results are consolidated
046: * @return the number of the available account balances
047: */
048: public Integer getAvailableAccountBalanceCount(Map fieldValues,
049: boolean isConsolidated);
050:
051: /**
052: * This method finds the available account balances according to input fields and values
053: *
054: * @param fieldValues the input fields and values
055: * @param isConsolidated determine whether the search results are consolidated
056: * @return a collection of account balance entries
057: */
058: public Iterator findAvailableAccountBalance(Map fieldValues);
059:
060: /**
061: * This method finds the available account balances according to input fields and values
062: *
063: * @param universityFiscalYear the fiscal year account to find account balances for
064: * @param chartOfAccountsCode the chart of accounts code to find account balances for
065: * @param accountNumber the account number to find account balances for
066: * @param subAccountNumber the sub account number to find account balances for
067: * @param isCostShareExcluded should account balances found have cost share information excluded?
068: * @param isConsolidated should account balances found be consolidated?
069: * @param pendingEntryCode should pending entries be included in the query?
070: * @return a List of qualifying account balance records
071: */
072: public List findAccountBalanceByConsolidation(
073: Integer universityFiscalYear, String chartOfAccountsCode,
074: String accountNumber, String subAccountNumber,
075: boolean isCostShareExcluded, boolean isConsolidated,
076: int pendingEntryCode);
077:
078: /**
079: * This method finds the available account balances according to input fields and values
080: *
081: * @param universityFiscalYear the fiscal year account to find account balances for
082: * @param chartOfAccountsCode the chart of accounts code to find account balances for
083: * @param accountNumber the account number to find account balances for
084: * @param subAccountNumber the sub account number to find account balances for
085: * @param financialConsolidationCode the consolidation code to find account balances for
086: * @param isCostShareExcluded should account balances found have cost share information excluded?
087: * @param isConsolidated should account balances found be consolidated?
088: * @param pendingEntryCode should pending entries be included in the query?
089: * @return a List of qualifying account balance records
090: */
091: public List findAccountBalanceByLevel(Integer universityFiscalYear,
092: String chartOfAccountsCode, String accountNumber,
093: String subAccountNumber,
094: String financialConsolidationObjectCode,
095: boolean isCostShareExcluded, boolean isConsolidated,
096: int pendingEntryCode);
097:
098: /**
099: * This method finds the available account balances according to input fields and values
100: *
101: * @param universityFiscalYear the fiscal year account to find account balances for
102: * @param chartOfAccountsCode the chart of accounts code to find account balances for
103: * @param accountNumber the account number to find account balances for
104: * @param subAccountNumber the sub account number to find account balances for
105: * @param financialObjectLevelCode the financial object level code to find account balances for
106: * @param financialReportingSortCode the reporting sort code to sort account balances by
107: * @param isCostShareExcluded should account balances found have cost share information excluded?
108: * @param isConsolidated should account balances found be consolidated?
109: * @param pendingEntryCode should pending entries be included in the query?
110: * @return a List of qualifying account balance records
111: */
112: public List findAccountBalanceByObject(
113: Integer universityFiscalYear, String chartOfAccountsCode,
114: String accountNumber, String subAccountNumber,
115: String financialObjectLevelCode,
116: String financialReportingSortCode,
117: boolean isCostShareExcluded, boolean isConsolidated,
118: int pendingEntryCode);
119:
120: /**
121: * Save an account balance
122: *
123: * @param ab account balance record to save
124: */
125: public void save(AccountBalance ab);
126:
127: /**
128: * Purge an entire fiscal year for a single chart.
129: *
130: * @param chartOfAccountsCode the chart of accounts to purge account balance records from
131: * @param year the fiscal year to purge account balance records of
132: */
133: public void purgeYearByChart(String chartOfAccountsCode, int year);
134: }
|