Interface IAdminWorkgroupDAO

  • All Known Implementing Classes:
    AdminWorkgroupDAO

    public interface IAdminWorkgroupDAO
    Interface for AdminWorkgroup DAO
    • 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 Id
        strWorkgroup - 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 insert
        strWorkgroupKey - the key workgroup
      • deleteUserFromWorkgroup

        void deleteUserFromWorkgroup​(int userId,
                                     java.lang.String strWorkgroupKey)
        Remove an user from a workgroup
        Parameters:
        userId - The user ID
        strWorkgroupKey - 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