Class AdminWorkgroupDAO

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

public final class AdminWorkgroupDAO extends Object implements IAdminWorkgroupDAO
This class provides Data Access methods for AdminWorkgroup objects
  • Constructor Details

    • AdminWorkgroupDAO

      public AdminWorkgroupDAO()
  • Method Details

    • 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(String strWorkgroupKey)
      Load the data of AdminWorkgroup from the table
      Specified by:
      load in interface IAdminWorkgroupDAO
      Parameters:
      strWorkgroupKey - The workgroup key
      Returns:
      the instance of the AdminWorkgroup
    • delete

      public void delete(String strWorkgroupKey)
      Delete a record from the table
      Specified by:
      delete in interface IAdminWorkgroupDAO
      Parameters:
      strWorkgroupKey - The workgroup key
    • store

      public void store(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:
      workgroup - The reference of workgroup to be the new one
    • selectWorkgroupList

      public Collection<AdminWorkgroup> selectWorkgroupList()
      Load the list of workgroups
      Specified by:
      selectWorkgroupList in interface IAdminWorkgroupDAO
      Returns:
      The Collection of the Workgroups
    • checkExistWorkgroup

      public boolean checkExistWorkgroup(String strWorkgroupKey)
      Check that the given key points to an existing workgroup
      Specified by:
      checkExistWorkgroup in interface IAdminWorkgroupDAO
      Parameters:
      strWorkgroupKey - The workgroup key
      Returns:
      true if the workgroup exists, false otherwise
    • isUserInWorkgroup

      public boolean isUserInWorkgroup(int nIdUser, String strWorkgroupKey)
      Is the user member of the workgroup
      Specified by:
      isUserInWorkgroup in interface IAdminWorkgroupDAO
      Parameters:
      nIdUser - The user Id
      strWorkgroupKey - 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:
      checkUserHasWorkgroup in interface IAdminWorkgroupDAO
      Parameters:
      nIdUser - The user Id
      Returns:
      True if the user has workgroup
    • 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
      Returns:
      The list of all user's workgroups
    • getUsersListForWorkgroup

      public Collection<AdminUser> getUsersListForWorkgroup(String strWorkgroupKey)
      Returns the list of all users for a workgroup
      Specified by:
      getUsersListForWorkgroup in interface IAdminWorkgroupDAO
      Parameters:
      strWorkgroupKey - The workgroup key
      Returns:
      The collection of all users of a workgroup
    • deleteAllUsersForWorkgroup

      public void deleteAllUsersForWorkgroup(String strWorkgroupKey)
      Remove all users of a workgroup
      Specified by:
      deleteAllUsersForWorkgroup in interface IAdminWorkgroupDAO
      Parameters:
      strWorkgroupKey - The workgroup key
    • insertUserForWorkgroup

      public void insertUserForWorkgroup(AdminUser user, String strWorkgroupKey)
      Insert a user into a workgroup
      Specified by:
      insertUserForWorkgroup in interface IAdminWorkgroupDAO
      Parameters:
      user - The user to insert
      strWorkgroupKey - the key workgroup
    • deleteUserFromWorkgroup

      public void deleteUserFromWorkgroup(int nUserId, String strWorkgroupKey)
      Remove an user from a workgroup
      Specified by:
      deleteUserFromWorkgroup in interface IAdminWorkgroupDAO
      Parameters:
      nUserId - The user ID
      strWorkgroupKey - The workgroup key
    • selectWorkgroupsByFilter

      public Collection<AdminWorkgroup> selectWorkgroupsByFilter(AdminWorkgroupFilter awFilter)
      Find workgroups from a filter
      Specified by:
      selectWorkgroupsByFilter in interface IAdminWorkgroupDAO
      Parameters:
      awFilter - the filter
      Returns:
      the list of workgroups