KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > blandware > atleap > persistence > core > GroupDAO


1 /*
2  * Copyright 2005 Blandware (http://www.blandware.com)
3  *
4  * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
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 com.blandware.atleap.persistence.core;
17
18 import com.blandware.atleap.model.core.Group;
19 import com.blandware.atleap.common.util.PartialCollection;
20 import com.blandware.atleap.common.util.QueryInfo;
21
22 /**
23  * <p>Group Data Access Object (DAO) interface.
24  * </p>
25  * <p><a HREF="GroupDAO.java.htm"><i>View source</i></a></p>
26  *
27  * @author Roman Puchkovskiy <a HREF="mailto:roman.puchkovskiy@blandware.com">
28  * &lt;roman.puchkovskiy@blandware.com&gt;</a>
29  * @version $Revision: 1.1 $ $Date: 2006/03/06 18:12:28 $
30  */

31 public interface GroupDAO extends DAO {
32     // ~ CRUD Methods ================================================================
33

34     /**
35      * Creates new group
36      *
37      * @param group Value object that represents what group must be created
38      */

39     public void createGroup(Group group);
40
41     /**
42      * Retrieves group with specified name
43      *
44      * @param groupName Name to search by
45      * @return Group or null if no group with specified name exists in database
46      */

47     public Group retrieveGroup(String JavaDoc groupName);
48
49     /**
50      * Updates group
51      *
52      * @param group Group to update
53      */

54     public void updateGroup(Group group);
55
56     /**
57      * Deletes group
58      *
59      * @param group Group to delete
60      */

61     public void deleteGroup(Group group);
62
63     // ~ Additional methods ================================================================
64

65     /**
66      * Retrieves filtered/sorted collection of groups.
67      *
68      * @param queryInfo Object that contains information about how to filter and sort data
69      * @return Collection of groups
70      */

71     public PartialCollection listGroups(QueryInfo queryInfo);
72
73     /**
74      * Searches for duplicates. Returns <code>true</code> if there is one or more groups with another ID, but which
75      * have same values from some set (e.g. title)
76      *
77      * @param group Group to find duplicates for
78      * @return whether given group has duplicates
79      */

80     public boolean hasDuplicates(Group group);
81
82     // ~ Finders ================================================================
83

84     /**
85      * Finds group by given title
86      *
87      * @param title to search group by
88      * @return Group or null if nothing was found
89      */

90     public Group findGroupByTitle(String JavaDoc title);
91
92 }
93
Popular Tags