Interface IAdminWorkgroupDAO
-
- All Known Implementing Classes:
AdminWorkgroupDAO
public interface IAdminWorkgroupDAOInterface for AdminWorkgroup DAO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancheckExistWorkgroup(java.lang.String strWorkgroupKey)Check that the given key points to an existing workgroupbooleancheckUserHasWorkgroup(int nIdUser)Is the user member of the workgroupvoiddelete(java.lang.String strWorkgroupKey)Delete a record from the tablevoiddeleteAllUsersForWorkgroup(java.lang.String strWorkgroupKey)Remove all users of a workgroupvoiddeleteUserFromWorkgroup(int userId, java.lang.String strWorkgroupKey)Remove an user from a workgroupjava.util.Collection<AdminUser>getUsersListForWorkgroup(java.lang.String strWorkgroupKey)Returns the list of all users for a workgroupReferenceListgetUserWorkgroups(int nIdUser)Returns the list of all workgroups the user is membervoidinsert(AdminWorkgroup workgroup)Insert a new record in the table.voidinsertUserForWorkgroup(AdminUser user, java.lang.String strWorkgroupKey)Insert a user into a workgroupbooleanisUserInWorkgroup(int nIdUser, java.lang.String strWorkgroup)Is the user member of the workgroupAdminWorkgroupload(java.lang.String strWorkgroupKey)Load the data of AdminWorkgroup from the tablejava.util.Collection<AdminWorkgroup>selectWorkgroupList()Load the list of workgroupsjava.util.Collection<AdminWorkgroup>selectWorkgroupsByFilter(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
-
-
-
Method Detail
-
checkExistWorkgroup
boolean checkExistWorkgroup(java.lang.String strWorkgroupKey)
Check that the given key points to an existing workgroup- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- true if the workgroup exists, false otherwise
-
delete
void delete(java.lang.String strWorkgroupKey)
Delete a record from the table- Parameters:
strWorkgroupKey- The workgroup key
-
insert
void insert(AdminWorkgroup workgroup)
Insert a new record in the table.- Parameters:
workgroup- The workgroup object
-
load
AdminWorkgroup load(java.lang.String strWorkgroupKey)
Load the data of AdminWorkgroup from the table- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- the instance of the AdminWorkgroup
-
selectWorkgroupList
java.util.Collection<AdminWorkgroup> selectWorkgroupList()
Load the list of workgroups- Returns:
- The Collection of the Workgroups
-
store
void store(AdminWorkgroup workgroup)
Update the record identified by the given workgroup key with the given workgroup in the table- Parameters:
workgroup- The reference of workgroup to be the new one
-
isUserInWorkgroup
boolean isUserInWorkgroup(int nIdUser, java.lang.String strWorkgroup)Is the user member of the workgroup- Parameters:
nIdUser- The user IdstrWorkgroup- The workgroup key- Returns:
- True if the user is in the workgroup, otherwise false
-
checkUserHasWorkgroup
boolean checkUserHasWorkgroup(int nIdUser)
Is the user member of the workgroup- Parameters:
nIdUser- The user Id- Returns:
- True if the user has workgroup
-
getUserWorkgroups
ReferenceList getUserWorkgroups(int nIdUser)
Returns the list of all workgroups the user is member- Parameters:
nIdUser- The user Id- Returns:
- The list of all user's workgroups
-
getUsersListForWorkgroup
java.util.Collection<AdminUser> getUsersListForWorkgroup(java.lang.String strWorkgroupKey)
Returns the list of all users for a workgroup- Parameters:
strWorkgroupKey- The workgroup key- Returns:
- The collection of all users of a workgroup
-
deleteAllUsersForWorkgroup
void deleteAllUsersForWorkgroup(java.lang.String strWorkgroupKey)
Remove all users of a workgroup- Parameters:
strWorkgroupKey- The workgroup key
-
insertUserForWorkgroup
void insertUserForWorkgroup(AdminUser user, java.lang.String strWorkgroupKey)
Insert a user into a workgroup- Parameters:
user- The user to insertstrWorkgroupKey- the key workgroup
-
deleteUserFromWorkgroup
void deleteUserFromWorkgroup(int userId, java.lang.String strWorkgroupKey)Remove an user from a workgroup- Parameters:
userId- The user IDstrWorkgroupKey- The workgroup key
-
selectWorkgroupsByFilter
java.util.Collection<AdminWorkgroup> selectWorkgroupsByFilter(AdminWorkgroupFilter awFilter)
Find workgroups from a filter- Parameters:
awFilter- the filter- Returns:
- the list of workgroups
-
-