com.stratelia.webactiv.beans.admin.dao
Class GroupDAO

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.dao.GroupDAO

public class GroupDAO
extends Object


Constructor Summary
GroupDAO()
           
 
Method Summary
 List<Group> getAllGroups(Connection connection)
          Gets all the user groups available in Silverpeas whatever the user domain they belongs to.
 Group getGroup(Connection con, String groupId)
           
 ListSlice<Group> getGroupsByCriteria(Connection connection, GroupSearchCriteriaForDAO criteria)
          Gets the user groups that match the specified criteria.
 List<String> getManageableGroupIds(Connection con, String userId, List<String> groupIds)
           
 int getNBUsersDirectlyInGroup(Connection con, String groupId)
           
 List<Group> getSubGroups(Connection con, String groupId)
           
 List<String> getUsersDirectlyInGroup(Connection con, String groupId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupDAO

public GroupDAO()
Method Detail

getAllGroups

public List<Group> getAllGroups(Connection connection)
                         throws SQLException
Gets all the user groups available in Silverpeas whatever the user domain they belongs to.

Parameters:
connection - the connection with the data source to use.
Returns:
a list of user groups.
Throws:
SQLException - if an error occurs while getting the user groups from the data source.

getGroupsByCriteria

public ListSlice<Group> getGroupsByCriteria(Connection connection,
                                            GroupSearchCriteriaForDAO criteria)
                                     throws SQLException
Gets the user groups that match the specified criteria. The criteria are provided by a SearchCriteriaBuilder instance that was used to create them.

Parameters:
connection - the connetion with a data source to use.
criteria - a builder with which the criteria the user groups must satisfy has been built.
Returns:
a list slice of user groups matching the criteria or an empty list if no such user groups are found. The slice is set by the pagination criteriion. If no such criterion is provided, then it is the whole list of groups matching the other criteria.
Throws:
SQLException

getGroup

public Group getGroup(Connection con,
                      String groupId)
               throws SQLException
Throws:
SQLException

getSubGroups

public List<Group> getSubGroups(Connection con,
                                String groupId)
                         throws SQLException
Throws:
SQLException

getNBUsersDirectlyInGroup

public int getNBUsersDirectlyInGroup(Connection con,
                                     String groupId)
                              throws SQLException
Throws:
SQLException

getUsersDirectlyInGroup

public List<String> getUsersDirectlyInGroup(Connection con,
                                            String groupId)
                                     throws SQLException
Throws:
SQLException

getManageableGroupIds

public List<String> getManageableGroupIds(Connection con,
                                          String userId,
                                          List<String> groupIds)
                                   throws SQLException
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.