01: /*
02: * Copyright 2005-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
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.module.chart.dao;
17:
18: import java.util.Iterator;
19: import java.util.List;
20:
21: import org.kuali.core.bo.user.UniversalUser;
22: import org.kuali.module.chart.bo.Account;
23: import org.kuali.module.chart.bo.Delegate;
24:
25: /**
26: * This interface defines what methods of data retrieval should be allowed for {@link org.kuali.module.chart.bo.Account}, and
27: * {@link org.kuali.module.chart.bo.Delegate}. It also defines a method for checking if a given User is responsible for an Account
28: */
29: public interface AccountDao {
30:
31: /**
32: * @param chartOfAccountsCode - part of composite key
33: * @param accountNumber - part of composite key
34: * @return Account Retrieves an Account object based on primary key.
35: */
36: public Account getByPrimaryId(String chartOfAccountsCode,
37: String accountNumber);
38:
39: /**
40: * @see org.kuali.module.chart.service.AccountService#getPrimaryDelegationByExample(org.kuali.module.chart.bo.Delegate,
41: * java.lang.String)
42: */
43: public Delegate getPrimaryDelegationByExample(
44: Delegate delegateExample, String totalDollarAmount);
45:
46: /**
47: * @see org.kuali.module.chart.service.AccountService#getSecondaryDelegationsByExample(org.kuali.module.chart.bo.Delegate,
48: * java.lang.String)
49: */
50: public List getSecondaryDelegationsByExample(
51: Delegate delegateExample, String totalDollarAmount);
52:
53: /**
54: * fetch the AccountResponsibility objects that the user has associated with them
55: *
56: * @param kualiUser
57: * @return a list of AccountResponsibility objects
58: */
59: public List getAccountsThatUserIsResponsibleFor(
60: UniversalUser kualiUser);
61:
62: /**
63: * This method should determine if the given user has any responsibilities on the given account
64: *
65: * @param universalUser the user to check responsibilities for
66: * @param account the account to check responsibilities on
67: * @return true if user is somehow responsible for account, false if otherwise
68: */
69: public boolean determineUserResponsibilityOnAccount(
70: UniversalUser universalUser, Account account);
71:
72: /**
73: * get all accounts in the system. This is needed by a sufficient funds rebuilder job
74: *
75: * @return iterator of all accounts
76: */
77: public Iterator getAllAccounts();
78: }
|