fr.paris.lutece.portal.business.workgroup
Class AdminWorkgroupDAO

java.lang.Object
  extended by fr.paris.lutece.portal.business.workgroup.AdminWorkgroupDAO
All Implemented Interfaces:
IAdminWorkgroupDAO

public final class AdminWorkgroupDAO
extends java.lang.Object
implements IAdminWorkgroupDAO

This class provides Data Access methods for AdminWorkgroup objects


Constructor Summary
AdminWorkgroupDAO()
           
 
Method Summary
 boolean checkExistWorkgroup(java.lang.String strWorkgroupKey)
          Check that the given key points to an existing workgroup
 void delete(java.lang.String strWorkgroupKey)
          Delete a record from the table
 void deleteAllUsersForWorkgroup(java.lang.String strWorkgroupKey)
           
 void deleteUserFromWorkgroup(int nUserId, java.lang.String strWorkgroupKey)
           
 java.util.Collection<AdminUser> getUsersListForWorkgroup(java.lang.String strWorkgroupKey)
          Returns the list of all users for a workgroup
 ReferenceList getUserWorkgroups(int nIdUser)
          Returns the list of all workgroups the user is member
 void insert(AdminWorkgroup workgroup)
          Insert a new record in the table.
 void insertUserForWorkgroup(AdminUser user, java.lang.String strWorkgroupKey)
           
 boolean isUserInWorkgroup(int nIdUser, java.lang.String strWorkgroupKey)
          Is the user member of the workgroup
 AdminWorkgroup load(java.lang.String strWorkgroupKey)
          Load the data of AdminWorkgroup from the table
 java.util.Collection<AdminWorkgroup> selectWorkgroupList()
          Load the list of workgroups
 void store(java.lang.String strWorkgroupKey, AdminWorkgroup workgroup)
          Update the record identified by the given workgroup key with the given workgroup in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminWorkgroupDAO

public AdminWorkgroupDAO()
Method Detail

insert

public void insert(AdminWorkgroup workgroup)
Insert a new record in the table.

Specified by:
insert in interface IAdminWorkgroupDAO
Parameters:
workgroup - The workgroup object

load

public AdminWorkgroup load(java.lang.String strWorkgroupKey)
Load the data of AdminWorkgroup from the table

Specified by:
load in interface IAdminWorkgroupDAO
Parameters:
nWorkgroupId - The identifier of AdminWorkgroup
Returns:
the instance of the AdminWorkgroup

delete

public void delete(java.lang.String strWorkgroupKey)
Delete a record from the table

Specified by:
delete in interface IAdminWorkgroupDAO
Parameters:
workgroup - The AdminWorkgroup object

store

public void store(java.lang.String strWorkgroupKey,
                  AdminWorkgroup workgroup)
Update the record identified by the given workgroup key with the given workgroup in the table

Specified by:
store in interface IAdminWorkgroupDAO
Parameters:
strWorkgroupKey - the key of the workgroup to modify
workgroup - The reference of workgroup to be the new one

selectWorkgroupList

public java.util.Collection<AdminWorkgroup> selectWorkgroupList()
Load the list of workgroups

Specified by:
selectWorkgroupList in interface IAdminWorkgroupDAO
Returns:
The Collection of the Workgroups

checkExistWorkgroup

public boolean checkExistWorkgroup(java.lang.String strWorkgroupKey)
Check that the given key points to an existing workgroup

Specified by:
checkExistWorkgroup in interface IAdminWorkgroupDAO
Parameters:
strNewWorkgroupKey -
Returns:
true if the workgroup exists, false otherwise

isUserInWorkgroup

public boolean isUserInWorkgroup(int nIdUser,
                                 java.lang.String strWorkgroupKey)
Is the user member of the workgroup

Specified by:
isUserInWorkgroup in interface IAdminWorkgroupDAO
Parameters:
nIdUser - The user Id
strWorkgroup - The workgroup key

getUserWorkgroups

public ReferenceList getUserWorkgroups(int nIdUser)
Returns the list of all workgroups the user is member

Specified by:
getUserWorkgroups in interface IAdminWorkgroupDAO
Parameters:
nIdUser - The user Id

getUsersListForWorkgroup

public java.util.Collection<AdminUser> getUsersListForWorkgroup(java.lang.String strWorkgroupKey)
Description copied from interface: IAdminWorkgroupDAO
Returns the list of all users for a workgroup

Specified by:
getUsersListForWorkgroup in interface IAdminWorkgroupDAO

deleteAllUsersForWorkgroup

public void deleteAllUsersForWorkgroup(java.lang.String strWorkgroupKey)
Specified by:
deleteAllUsersForWorkgroup in interface IAdminWorkgroupDAO
Parameters:
nUserId - the user id

insertUserForWorkgroup

public void insertUserForWorkgroup(AdminUser user,
                                   java.lang.String strWorkgroupKey)
Specified by:
insertUserForWorkgroup in interface IAdminWorkgroupDAO
Parameters:
nUserId - the user id
strWorkgroupKey - the key workgroup

deleteUserFromWorkgroup

public void deleteUserFromWorkgroup(int nUserId,
                                    java.lang.String strWorkgroupKey)
Specified by:
deleteUserFromWorkgroup in interface IAdminWorkgroupDAO
Parameters:
nUserId - the user id
strWorkgroupKey - the key workgroup


Copyright © 2007 Mairie de Paris. All Rights Reserved.