1 /*
2 * Copyright 2005-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.dataaccess;
17
18 import java.sql.Date;
19 import java.util.Collection;
20 import java.util.Map;
21
22 import org.kuali.ole.gl.businessobject.OriginEntryGroup;
23
24 public interface OriginEntryGroupDao {
25 /**
26 * Given an origin entry group source type (defined in OriginEntrySource)
27 *
28 * @param sourceCode the source code of the groups to find
29 * @return a OriginEntryGroup with the given source code and max ORIGIN_ENTRY_GRP_ID
30 * @see org.kuali.ole.gl.businessobject.OriginEntrySource
31 */
32 public OriginEntryGroup getGroupWithMaxIdFromSource(String sourceCode);
33
34 /**
35 * Get all the groups that are older than a date
36 *
37 * @param day the date groups returned should be older than
38 * @return a Collection of origin entry groups older than that date
39 */
40 public Collection<OriginEntryGroup> getOlderGroups(Date day);
41
42 /**
43 * Delete all the groups in the list. Note...it doesn't delete the entries within them, you need
44 * OriginEntryDao.deleteGroups for that
45 *
46 * @params groups a Collection of origin entry groups to delete
47 */
48 public void deleteGroups(Collection<OriginEntryGroup> groups);
49
50 /**
51 * Fetch all the groups that match the criteria
52 *
53 * @param searchCriteria a Map of search criteria to form the query
54 * @return a Collection of Origin Entry Groups that match that criteria
55 */
56 public Collection getMatchingGroups(Map searchCriteria);
57
58 /**
59 * Get all the groups for the poster (that is to say, Groups with "Process" being true)
60 *
61 * @param groupSourceCode the source code of origin entry groups to return
62 * @return a Collection of origin entry groups that should be processed by the poster
63 */
64 public Collection getPosterGroups(String groupSourceCode);
65
66 /**
67 * Gets a collection of all backup groups that are scrubbable (i.e. valid, process, scrub indicators all set to true)
68 *
69 * @return a Collection of scrubbable origin entry groups
70 */
71 public Collection<OriginEntryGroup> getAllScrubbableBackupGroups();
72
73 /**
74 * Get all the groups to be copied into the backup group
75 *
76 * @param groupDate the date returned origin entry groups must have been created on or before
77 * @return a Collection of origin entry groups to backup
78 */
79 public Collection getGroupsToBackup(Date groupDate);
80
81 /**
82 * The the group for the ID passed. The EXACT one, not one that is close, it must be EXACTLY EXACT.
83 *
84 * @param id the group id of the group to return
85 * @return a highly exact origin entry group, or, if not found, null
86 */
87 public OriginEntryGroup getExactMatchingEntryGroup(Integer id);
88
89 /**
90 * Fetches groups created on or after the given date
91 *
92 * @param day the date origin entry groups to return must have been created on or after
93 * @return a Collection of origin entry groups created on or after that day
94 */
95 public Collection<OriginEntryGroup> getRecentGroups(Date day);
96 }