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

public class SpaceDAOImpl extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<SpaceEntity,Long> implements SpaceDAO
  • Constructor Details

    • SpaceDAOImpl

      public SpaceDAOImpl()
  • Method Details

    • getLastSpaces

      public List<Long> getLastSpaces(int limit)
      Specified by:
      getLastSpaces in interface SpaceDAO
    • getSpaceByGroupId

      public SpaceEntity getSpaceByGroupId(String groupId)
      Specified by:
      getSpaceByGroupId in interface SpaceDAO
    • getSpaceByPrettyName

      public SpaceEntity getSpaceByPrettyName(String spacePrettyName)
      Specified by:
      getSpaceByPrettyName in interface SpaceDAO
    • getCommonSpaces

      public List<SpaceEntity> getCommonSpaces(String userId, String otherUserId, int offset, int limit)
      Description copied from interface: SpaceDAO
      Get common spaces between two users
      Specified by:
      getCommonSpaces in interface SpaceDAO
      Parameters:
      userId - connected user id
      otherUserId - visited profile user id
      offset -
      limit -
      Returns:
      list of common spaces between two users in param
    • countCommonSpaces

      public int countCommonSpaces(String userId, String otherUserId)
      Description copied from interface: SpaceDAO
      Count common spaces between two users
      Specified by:
      countCommonSpaces in interface SpaceDAO
      Parameters:
      userId - connected user id
      otherUserId - visited profile user id
      Returns:
      list of common spaces between two users in param
    • countSpacesByTemplate

      public Map<Long,Long> countSpacesByTemplate()
      Specified by:
      countSpacesByTemplate in interface SpaceDAO
      Returns:
      the count of spaces by Space Template identifier