com.stratelia.silverpeas.domains.sqldriver
Class SQLGroupUserRelTable

java.lang.Object
  extended by com.stratelia.silverpeas.domains.sqldriver.SQLGroupUserRelTable

public class SQLGroupUserRelTable
extends Object

A GroupTable object manages the DomainSQL_Group table.


Constructor Summary
SQLGroupUserRelTable(SQLSettings ds)
           
 
Method Summary
 int createGroupUserRel(Connection c, int groupId, int userId)
          Insert a new group row.
 List<String> getDirectGroupIdsOfUser(Connection c, int userId)
          Returns all the groups in a given userRole (not recursive).
 List<String> getDirectUserIdsOfGroup(Connection c, int groupId)
          Returns all the User ids which compose a group.
 boolean isUserDirectlyInGroup(Connection c, int userId, int groupId)
          Tests if a user is in given group (not recursive).
 int removeAllGroupRel(Connection c, int groupId)
          Insert a new group row.
 int removeAllUserRel(Connection c, int userId)
          Insert a new group row.
 int removeGroupUserRel(Connection c, int groupId, int userId)
          Insert a new group row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLGroupUserRelTable

public SQLGroupUserRelTable(SQLSettings ds)
Method Detail

getDirectUserIdsOfGroup

public List<String> getDirectUserIdsOfGroup(Connection c,
                                            int groupId)
                                     throws AdminException
Returns all the User ids which compose a group.

Throws:
AdminException

getDirectGroupIdsOfUser

public List<String> getDirectGroupIdsOfUser(Connection c,
                                            int userId)
                                     throws AdminException
Returns all the groups in a given userRole (not recursive).

Throws:
AdminException

createGroupUserRel

public int createGroupUserRel(Connection c,
                              int groupId,
                              int userId)
                       throws AdminException
Insert a new group row.

Throws:
AdminException

removeGroupUserRel

public int removeGroupUserRel(Connection c,
                              int groupId,
                              int userId)
                       throws AdminException
Insert a new group row.

Throws:
AdminException

removeAllUserRel

public int removeAllUserRel(Connection c,
                            int userId)
                     throws AdminException
Insert a new group row.

Throws:
AdminException

removeAllGroupRel

public int removeAllGroupRel(Connection c,
                             int groupId)
                      throws AdminException
Insert a new group row.

Throws:
AdminException

isUserDirectlyInGroup

public boolean isUserDirectlyInGroup(Connection c,
                                     int userId,
                                     int groupId)
                              throws AdminException
Tests if a user is in given group (not recursive).

Throws:
AdminException


Copyright © 2016 Silverpeas. All Rights Reserved.