Class AdminWorkgroupDAO
java.lang.Object
fr.paris.lutece.portal.business.workgroup.AdminWorkgroupDAO
- All Implemented Interfaces:
IAdminWorkgroupDAO
@ApplicationScoped
public final class AdminWorkgroupDAO
extends Object
implements IAdminWorkgroupDAO
This class provides Data Access methods for AdminWorkgroup objects
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckExistWorkgroup(String strWorkgroupKey) Check that the given key points to an existing workgroupbooleancheckUserHasWorkgroup(int nIdUser) Is the user member of the workgroupvoidDelete a record from the tablevoiddeleteAllUsersForWorkgroup(String strWorkgroupKey) Remove all users of a workgroupvoiddeleteUserFromWorkgroup(int nUserId, String strWorkgroupKey) Remove an user from a workgroupgetUsersListForWorkgroup(String strWorkgroupKey) Returns the list of all users for a workgroupgetUserWorkgroups(int nIdUser) Returns the list of all workgroups the user is membervoidinsert(AdminWorkgroup workgroup) Insert a new record in the table.voidinsertUserForWorkgroup(AdminUser user, String strWorkgroupKey) Insert a user into a workgroupbooleanisUserInWorkgroup(int nIdUser, String strWorkgroupKey) Is the user member of the workgroupLoad the data of AdminWorkgroup from the tableLoad the list of workgroupsselectWorkgroupsByFilter(AdminWorkgroupFilter awFilter) Find workgroups from a filtervoidstore(AdminWorkgroup workgroup) Update the record identified by the given workgroup key with the given workgroup in the table
-
Constructor Details
-
AdminWorkgroupDAO
public AdminWorkgroupDAO()
-
-
Method Details
-
insert
Insert a new record in the table.- Specified by:
insertin interfaceIAdminWorkgroupDAO- Parameters:
workgroup- The workgroup object
-
load
Load the data of AdminWorkgroup from the table- Specified by:
loadin interfaceIAdminWorkgroupDAO- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- the instance of the AdminWorkgroup
-
delete
Delete a record from the table- Specified by:
deletein interfaceIAdminWorkgroupDAO- Parameters:
strWorkgroupKey- The workgroup key
-
store
Update the record identified by the given workgroup key with the given workgroup in the table- Specified by:
storein interfaceIAdminWorkgroupDAO- Parameters:
workgroup- The reference of workgroup to be the new one
-
selectWorkgroupList
Load the list of workgroups- Specified by:
selectWorkgroupListin interfaceIAdminWorkgroupDAO- Returns:
- The Collection of the Workgroups
-
checkExistWorkgroup
Check that the given key points to an existing workgroup- Specified by:
checkExistWorkgroupin interfaceIAdminWorkgroupDAO- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- true if the workgroup exists, false otherwise
-
isUserInWorkgroup
Is the user member of the workgroup- Specified by:
isUserInWorkgroupin interfaceIAdminWorkgroupDAO- Parameters:
nIdUser- The user IdstrWorkgroupKey- The workgroup key- Returns:
- True if the user is in the workgroup, otherwise false
-
checkUserHasWorkgroup
public boolean checkUserHasWorkgroup(int nIdUser) Is the user member of the workgroup- Specified by:
checkUserHasWorkgroupin interfaceIAdminWorkgroupDAO- Parameters:
nIdUser- The user Id- Returns:
- True if the user has workgroup
-
getUserWorkgroups
Returns the list of all workgroups the user is member- Specified by:
getUserWorkgroupsin interfaceIAdminWorkgroupDAO- Parameters:
nIdUser- The user Id- Returns:
- The list of all user's workgroups
-
getUsersListForWorkgroup
Returns the list of all users for a workgroup- Specified by:
getUsersListForWorkgroupin interfaceIAdminWorkgroupDAO- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- The collection of all users of a workgroup
-
deleteAllUsersForWorkgroup
Remove all users of a workgroup- Specified by:
deleteAllUsersForWorkgroupin interfaceIAdminWorkgroupDAO- Parameters:
strWorkgroupKey- The workgroup key
-
insertUserForWorkgroup
Insert a user into a workgroup- Specified by:
insertUserForWorkgroupin interfaceIAdminWorkgroupDAO- Parameters:
user- The user to insertstrWorkgroupKey- the key workgroup
-
deleteUserFromWorkgroup
Remove an user from a workgroup- Specified by:
deleteUserFromWorkgroupin interfaceIAdminWorkgroupDAO- Parameters:
nUserId- The user IDstrWorkgroupKey- The workgroup key
-
selectWorkgroupsByFilter
Find workgroups from a filter- Specified by:
selectWorkgroupsByFilterin interfaceIAdminWorkgroupDAO- Parameters:
awFilter- the filter- Returns:
- the list of workgroups
-