1 /*
2 * Copyright 2006 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.gl.service;
17
18 import java.util.Iterator;
19 import java.util.List;
20 import java.util.Map;
21
22 import org.kuali.ole.gl.businessobject.AccountBalance;
23
24 /**
25 * This interface delcares methods useful for dealing with AccountBalance objects.
26 */
27 public interface AccountBalanceService {
28 public final int PENDING_NONE = 1;
29 public final int PENDING_APPROVED = 2;
30 public final int PENDING_ALL = 3;
31
32 /**
33 * This method finds the available account balances according to input fields and values
34 *
35 * @param fieldValues the input fields and values
36 * @return the summary records of account balance entries
37 */
38 public Iterator findConsolidatedAvailableAccountBalance(Map fieldValues);
39
40 /**
41 * This method gets the number of the available account balances according to input fields and values
42 *
43 * @param fieldValues the input fields and values
44 * @param isConsolidated determine whether the search results are consolidated
45 * @return the number of the available account balances
46 */
47 public Integer getAvailableAccountBalanceCount(Map fieldValues, boolean isConsolidated);
48
49 /**
50 * This method finds the available account balances according to input fields and values
51 *
52 * @param fieldValues the input fields and values
53 * @param isConsolidated determine whether the search results are consolidated
54 * @return a collection of account balance entries
55 */
56 public Iterator findAvailableAccountBalance(Map fieldValues);
57
58 /**
59 * This method finds the available account balances according to input fields and values
60 *
61 * @param universityFiscalYear the fiscal year account to find account balances for
62 * @param chartOfAccountsCode the chart of accounts code to find account balances for
63 * @param accountNumber the account number to find account balances for
64 * @param subAccountNumber the sub account number to find account balances for
65 * @param isCostShareExcluded should account balances found have cost share information excluded?
66 * @param isConsolidated should account balances found be consolidated?
67 * @param pendingEntryCode should pending entries be included in the query?
68 * @return a List of qualifying account balance records
69 */
70 public List findAccountBalanceByConsolidation(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, String subAccountNumber, boolean isCostShareExcluded, boolean isConsolidated, int pendingEntryCode);
71
72 /**
73 * This method finds the available account balances according to input fields and values
74 *
75 * @param universityFiscalYear the fiscal year account to find account balances for
76 * @param chartOfAccountsCode the chart of accounts code to find account balances for
77 * @param accountNumber the account number to find account balances for
78 * @param subAccountNumber the sub account number to find account balances for
79 * @param financialConsolidationCode the consolidation code to find account balances for
80 * @param isCostShareExcluded should account balances found have cost share information excluded?
81 * @param isConsolidated should account balances found be consolidated?
82 * @param pendingEntryCode should pending entries be included in the query?
83 * @return a List of qualifying account balance records
84 */
85 public List findAccountBalanceByLevel(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, String subAccountNumber, String financialConsolidationObjectCode, boolean isCostShareExcluded, boolean isConsolidated, int pendingEntryCode);
86
87 /**
88 * This method finds the available account balances according to input fields and values
89 *
90 * @param universityFiscalYear the fiscal year account to find account balances for
91 * @param chartOfAccountsCode the chart of accounts code to find account balances for
92 * @param accountNumber the account number to find account balances for
93 * @param subAccountNumber the sub account number to find account balances for
94 * @param financialObjectLevelCode the financial object level code to find account balances for
95 * @param financialReportingSortCode the reporting sort code to sort account balances by
96 * @param isCostShareExcluded should account balances found have cost share information excluded?
97 * @param isConsolidated should account balances found be consolidated?
98 * @param pendingEntryCode should pending entries be included in the query?
99 * @return a List of qualifying account balance records
100 */
101 public List findAccountBalanceByObject(Integer universityFiscalYear, String chartOfAccountsCode, String accountNumber, String subAccountNumber, String financialObjectLevelCode, String financialReportingSortCode, boolean isCostShareExcluded, boolean isConsolidated, int pendingEntryCode);
102
103 /**
104 * Save an account balance
105 *
106 * @param ab account balance record to save
107 */
108 public void save(AccountBalance ab);
109
110 /**
111 * Purge an entire fiscal year for a single chart.
112 *
113 * @param chartOfAccountsCode the chart of accounts to purge account balance records from
114 * @param year the fiscal year to purge account balance records of
115 */
116 public void purgeYearByChart(String chartOfAccountsCode, int year);
117 }