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.List;
19:
20: import org.kuali.module.chart.bo.Org;
21:
22: /**
23: * This interface defines data access methods for {@link Org}
24: */
25: public interface OrganizationDao {
26: /**
27: * This method retrieves a {@link Org} based on primary keys
28: *
29: * @param chartOfAccountsCode
30: * @param organizationCode
31: * @return an {@link Org} based on primary keys
32: */
33: public Org getByPrimaryId(String chartOfAccountsCode,
34: String organizationCode);
35:
36: /**
37: * This method saves a specific {@link Org}
38: *
39: * @param organization
40: */
41: public void save(Org organization);
42:
43: /**
44: * This method retrieves a list of active {@link Org}s defined by their chart and organization code
45: *
46: * @param chartOfAccountsCode
47: * @param organizationCode
48: * @return a list of active {@link Org}s by chart and organization code
49: */
50: public List getActiveAccountsByOrg(String chartOfAccountsCode,
51: String organizationCode);
52:
53: /**
54: * This method retrieves a list of active child {@link Org}s based on their parent's organization code and chart code
55: *
56: * @param chartOfAccountsCode
57: * @param organizationCode
58: * @return a list of active {@link Org}s by their parent's chart and organization code
59: */
60: public List getActiveChildOrgs(String chartOfAccountsCode,
61: String organizationCode);
62:
63: /**
64: * Returns a list of active organizations with the given organization type code.
65: *
66: * @param organizationType
67: * @return a list of active {@link Org}s based on their organization type code
68: */
69: public List<Org> getActiveOrgsByType(String organizationTypeCode);
70:
71: /**
72: * This method retrieves a list of root organization codes (as a string array) based on their root chart and reports to org type
73: * code
74: *
75: * @param rootChart
76: * @param selfReportsOrgTypeCode
77: * @return a string array of root org codes based on root chart and reports to org type code
78: */
79: public String[] getRootOrganizationCode(String rootChart,
80: String selfReportsOrgTypeCode);
81:
82: }
|