Class SpaceMemberDAOImpl

java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<SpaceMemberEntity,Long>
org.exoplatform.social.core.jpa.storage.dao.jpa.SpaceMemberDAOImpl
All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<SpaceMemberEntity,Long>, SpaceMemberDAO

public class SpaceMemberDAOImpl extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<SpaceMemberEntity,Long> implements SpaceMemberDAO
  • Constructor Details

    • SpaceMemberDAOImpl

      public SpaceMemberDAOImpl()
  • Method Details

    • deleteBySpace

      public void deleteBySpace(SpaceEntity entity)
      Specified by:
      deleteBySpace in interface SpaceMemberDAO
    • sortSpaceMembers

      public List<String> sortSpaceMembers(List<String> userNames, String sortField, String sortDirection, boolean filterDisabled)
      Description copied from interface: SpaceMemberDAO
      Sort user identity remote ids
      Specified by:
      sortSpaceMembers in interface SpaceMemberDAO
      Parameters:
      userNames -
      sortField -
      sortDirection -
      filterDisabled -
      Returns:
      List of userNames sorted by sortField
    • getSpaceMembers

      public List<String> getSpaceMembers(Long spaceId, io.meeds.social.space.constant.SpaceMembershipStatus status, int offset, int limit)
      Description copied from interface: SpaceMemberDAO
      Get space members switch status
      Specified by:
      getSpaceMembers in interface SpaceMemberDAO
      Parameters:
      spaceId -
      status - equals to MEMBER, MANAGER, PENDING, INVITED or IGNORED
      offset -
      limit -
      Returns:
    • countSpaceMembers

      public int countSpaceMembers(Long spaceId, io.meeds.social.space.constant.SpaceMembershipStatus status)
      Description copied from interface: SpaceMemberDAO
      Count space members switch status
      Specified by:
      countSpaceMembers in interface SpaceMemberDAO
      Parameters:
      spaceId -
      status - equals to MEMBER, MANAGER, PENDING, INVITED or IGNORED
      Returns:
    • getSpaceMemberShip

      public SpaceMemberEntity getSpaceMemberShip(String remoteId, Long spaceId, io.meeds.social.space.constant.SpaceMembershipStatus status) throws IllegalArgumentException
      Specified by:
      getSpaceMemberShip in interface SpaceMemberDAO
      Throws:
      IllegalArgumentException
    • getSpaceIdentityIdsByUserRole

      public List<Long> getSpaceIdentityIdsByUserRole(String remoteId, io.meeds.social.space.constant.SpaceMembershipStatus status, int offset, int limit)
      Description copied from interface: SpaceMemberDAO
      Get space identity ids switch user status
      Specified by:
      getSpaceIdentityIdsByUserRole in interface SpaceMemberDAO
      Parameters:
      remoteId - user Identity remote Id
      status - equals to MEMBER, MANAGER, PENDING, INVITED or IGNORED
      offset - The starting point
      limit - limit of results to retrieve
      Returns:
      List of Space technical identifiers of type Long
    • getSpacesIdsByUserName

      public List<Long> getSpacesIdsByUserName(String remoteId, int offset, int limit)
      Specified by:
      getSpacesIdsByUserName in interface SpaceMemberDAO
    • getSpaceIdByMemberId

      public List<Long> getSpaceIdByMemberId(String username, int offset, int limit)
      Description copied from interface: SpaceMemberDAO
      Retrieves the list of Space technical identifiers
      Specified by:
      getSpaceIdByMemberId in interface SpaceMemberDAO
      Parameters:
      username - user remote id
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of Space technical identifiers of type Long
    • getSpaceIdsByUserRole

      public List<Long> getSpaceIdsByUserRole(String username, io.meeds.social.space.constant.SpaceMembershipStatus status, int offset, int limit)
      Description copied from interface: SpaceMemberDAO
      Retrieves the list of Space technical identifiers switch status
      Specified by:
      getSpaceIdsByUserRole in interface SpaceMemberDAO
      Parameters:
      username - user remote id
      status - equals to MEMBER, MANAGER, PENDING, INVITED or IGNORED
      offset - The starting point
      limit - The limitation of returned results
      Returns:
      List of Space technical identifiers of type Long
    • getPendingSpaceRequestsToManage

      public List<jakarta.persistence.Tuple> getPendingSpaceRequestsToManage(String username, int offset, int limit)
      Specified by:
      getPendingSpaceRequestsToManage in interface SpaceMemberDAO
      Parameters:
      username - username used to retrieve user spaces
      offset - offset of the query
      limit - limit of the query
      Returns:
      List Tuple of users requested to join spaces that designated user (with userId parameter) manages
    • countPendingSpaceRequestsToManage

      public int countPendingSpaceRequestsToManage(String username)
      Specified by:
      countPendingSpaceRequestsToManage in interface SpaceMemberDAO
      Parameters:
      username - username used to retrieve user spaces
      Returns:
      the count of users requested to join spaces that user manages
    • countExternalMembers

      public int countExternalMembers(Long spaceId)
      Description copied from interface: SpaceMemberDAO
      Counts the number of external users in a specific space
      Specified by:
      countExternalMembers in interface SpaceMemberDAO
      Parameters:
      spaceId -
      Returns:
      counts the external members in the space
    • getSpaceMembershipDate

      public Instant getSpaceMembershipDate(long spaceId, String username)
      Description copied from interface: SpaceMemberDAO
      Retrieves the Space Membership date
      Specified by:
      getSpaceMembershipDate in interface SpaceMemberDAO
      Parameters:
      spaceId - Space technical id
      username - User name (identifier)
      Returns:
      Instant corresponding to the creation date of the membership
    • getDisabledSpaceMembers

      public List<String> getDisabledSpaceMembers(Long spaceId, int offset, int limit)
      Description copied from interface: SpaceMemberDAO
      Get disabled space members
      Specified by:
      getDisabledSpaceMembers in interface SpaceMemberDAO
      Parameters:
      spaceId - the space ID
      offset - offset of the page
      limit - number of elements on each page
      Returns:
      list of user names
    • countDisabledSpaceMembers

      public int countDisabledSpaceMembers(Long spaceId)
      Description copied from interface: SpaceMemberDAO
      Count disabled space members
      Specified by:
      countDisabledSpaceMembers in interface SpaceMemberDAO
      Parameters:
      spaceId - the spaceID
      Returns:
      the number of disabled space members