01: /*
02: * Copyright 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.labor.dao;
17:
18: import java.util.Collection;
19: import java.util.Iterator;
20: import java.util.Map;
21:
22: import org.kuali.module.gl.bo.OriginEntryGroup;
23: import org.kuali.module.gl.dao.OriginEntryDao;
24: import org.kuali.module.labor.bo.LaborOriginEntry;
25:
26: /**
27: * This is the data access object for labor origin entry.
28: *
29: * @see org.kuali.module.labor.bo.LaborOriginEntry
30: */
31: public interface LaborOriginEntryDao extends OriginEntryDao {
32:
33: /**
34: * Get origin entries that belong to the given groups
35: *
36: * @param groups the given origin entry groups
37: * @return origin entries that belong to the given groups
38: */
39: Iterator<LaborOriginEntry> getEntriesByGroups(
40: Collection<OriginEntryGroup> groups);
41:
42: /**
43: * Get the origin entries that belong to the given group in either the consolidation manner
44: *
45: * @param group the given group
46: * @return the origin entries that belong to the given group in either the consolidation manner
47: */
48: Iterator<Object[]> getConsolidatedEntriesByGroup(
49: OriginEntryGroup group);
50:
51: /**
52: * get the count of the origin entry collection in the given groups
53: *
54: * @param groups the given groups
55: * @return the count of the origin entry collection in the given group
56: */
57: int getCountOfEntriesInGroups(Collection<OriginEntryGroup> groups);
58:
59: /**
60: * This method should only be used in unit tests. It loads all the ld_lbr_origin_entry_t rows in memory into a collection. This
61: * won't scale for production.
62: *
63: * @return a set of labor origin entries
64: */
65: Collection<LaborOriginEntry> testingLaborGetAllEntries();
66:
67: /**
68: * Return an iterator to all the entries in a group
69: *
70: * @param oeg the given origin entry group
71: * @return Iterator of entries in the specified group
72: */
73: Iterator<LaborOriginEntry> getLaborEntriesByGroup(
74: OriginEntryGroup oeg, int sort);
75:
76: /**
77: * Collection of entries that match criteria
78: *
79: * @param searchCriteria Map of field, value pairs
80: * @return collection of entries
81: */
82: Collection getMatchingEntriesByCollection(Map searchCriteria);
83:
84: /**
85: * Return a collection to all the entries in the given group
86: *
87: * @param group the given origin entry group
88: * @return Collection of entries in the specified group
89: */
90: Collection<LaborOriginEntry> getEntryCollectionByGroup(
91: OriginEntryGroup group);
92: }
|