Interface ActivityDAO

All Superinterfaces:
org.exoplatform.commons.api.persistence.GenericDAO<ActivityEntity,Long>
All Known Implementing Classes:
ActivityDAOImpl

public interface ActivityDAO extends org.exoplatform.commons.api.persistence.GenericDAO<ActivityEntity,Long>
Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com May 18, 2015
  • Method Details

    • getUserActivities

      List<Long> getUserActivities(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) throws org.exoplatform.social.core.storage.ActivityStorageException
      Parameters:
      owner - the identity
      offset - the offset index
      limit - the maximum number of ActivityEntity to load
      Returns:
      the activity entities
      Throws:
      org.exoplatform.social.core.storage.ActivityStorageException - if has any error
    • getUserIdsActivities

      List<String> getUserIdsActivities(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) throws org.exoplatform.social.core.storage.ActivityStorageException
      Gets Ids for User stream
      Parameters:
      owner - the Identity
      offset - the offset index
      limit - maximum number item to load
      Returns:
      the list of activity id
      Throws:
      org.exoplatform.social.core.storage.ActivityStorageException - if has any error
    • getActivityByFilter

      default List<Long> getActivityByFilter(org.exoplatform.social.core.activity.ActivityFilter activityFilter, List<String> spaceIdentityIds, int offset, int limit)
      Parameters:
      activityFilter - the activity filter
      spaceIdentityIds - the space identity ids
      offset - the offset index
      limit - the maximum number of ActivityEntity to load
      Returns:
      the activity entities
      Throws:
      org.exoplatform.social.core.storage.ActivityStorageException - if has any error
    • getActivityIdsByFilter

      default List<String> getActivityIdsByFilter(org.exoplatform.social.core.activity.ActivityFilter activityFilter, List<String> spaceIdentityIds, int offset, int limit)
      Parameters:
      activityFilter - the activity filter
      spaceIdentityIds - the space identity ids
      offset - the offset index
      limit - maximum number item to load
      Returns:
      the list of activity id
      Throws:
      org.exoplatform.social.core.storage.ActivityStorageException - if has any error
    • getActivitiesCountByFilter

      default int getActivitiesCountByFilter(org.exoplatform.social.core.activity.ActivityFilter activityFilter, List<String> spaceIdentityIds)
      Parameters:
      activityFilter - the activity filter
      spaceIdentityIds - the space identity ids
      Returns:
      the number of activities by filter
    • getNumberOfUserActivities

      int getNumberOfUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity)
      Parameters:
      ownerIdentity - the Identity
      Returns:
      the number of activities
    • getNewerOnUserActivities

      List<Long> getNewerOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the beginning time
      limit - the number of entities to load
      Returns:
      list of activity entities
    • getNumberOfNewerOnUserActivities

      int getNumberOfNewerOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the beginning time
      Returns:
      number of activities
    • getOlderOnUserActivities

      List<Long> getOlderOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the ending time
      limit - the number of entities to load
      Returns:
      list of activity entities
    • getNumberOfOlderOnUserActivities

      int getNumberOfOlderOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the end time
      Returns:
      number of activities
    • getSpaceActivities

      List<Long> getSpaceActivities(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) throws org.exoplatform.social.core.storage.ActivityStorageException
      Parameters:
      owner - the Identity
      offset - the start index
      limit - number of activity entities to load
      Returns:
      list of activity entities
      Throws:
      org.exoplatform.social.core.storage.ActivityStorageException - if has any error
    • getSpaceActivityIds

      List<String> getSpaceActivityIds(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) throws org.exoplatform.social.core.storage.ActivityStorageException
      Parameters:
      owner - the Identity
      offset - the start index
      limit - max number activity Id to load
      Returns:
      list of activity Ids
      Throws:
      org.exoplatform.social.core.storage.ActivityStorageException - if has any error
    • getNumberOfSpaceActivities

      int getNumberOfSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity)
      Parameters:
      spaceIdentity - the space Identity
      Returns:
      number of activities
    • getNewerOnSpaceActivities

      List<Long> getNewerOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime, int limit)
      Parameters:
      spaceIdentity - the space Identity
      sinceTime - the beginning time
      limit - max number of entities to load
      Returns:
      list of activity entities
    • getNumberOfNewerOnSpaceActivities

      int getNumberOfNewerOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime)
      Parameters:
      spaceIdentity - the space Identity
      sinceTime - the beginning time
      Returns:
      number of activities
    • getOlderOnSpaceActivities

      List<Long> getOlderOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime, int limit)
      Parameters:
      spaceIdentity - the space Identity
      sinceTime - the beginning time
      limit - max number of entities to load
      Returns:
      list of activity entities
    • getNumberOfOlderOnSpaceActivities

      int getNumberOfOlderOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime)
      Parameters:
      spaceIdentity - the space Identity
      sinceTime - the beginning time
      Returns:
      number of activities
    • getActivities

      List<Long> getActivities(org.exoplatform.social.core.identity.model.Identity owner, org.exoplatform.social.core.identity.model.Identity viewer, long offset, long limit) throws org.exoplatform.social.core.storage.ActivityStorageException
      Parameters:
      owner - the Identity
      viewer - the viewer Identity
      offset - the start index
      limit - max number of entities to load
      Returns:
      list of activity entities
      Throws:
      org.exoplatform.social.core.storage.ActivityStorageException - if has any error
    • getActivityFeed

      List<Long> getActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      offset - the start index
      limit - max number of entities to load
      spaceIds - list of space ids
      Returns:
      list of activity entities
    • getActivityIdsFeed

      List<String> getActivityIdsFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      offset - the start index
      limit - max number of ids to load
      spaceIds - list of space ids
      Returns:
      list of activity ids
    • getNumberOfActivitesOnActivityFeed

      int getNumberOfActivitesOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      spaceIds - list of space ids
      Returns:
      number of activities
    • getNewerOnActivityFeed

      List<Long> getNewerOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the beginning time
      limit - max number of entities to load
      spaceIds - list of space ids
      Returns:
      list of activity entities
    • getNumberOfNewerOnActivityFeed

      int getNumberOfNewerOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the beginning time
      spaceIds - list of space ids
      Returns:
      number of actvitites
    • getOlderOnActivityFeed

      List<Long> getOlderOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the end time
      limit - max number entities to load
      spaceIds - list of space ids
      Returns:
      list of activity entities
    • getNumberOfOlderOnActivityFeed

      int getNumberOfOlderOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the end time
      spaceIds - list of space ids
      Returns:
      number of activities
    • getUserSpacesActivities

      List<Long> getUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      offset - the start index
      limit - max number of entities to load
      spaceIds - list of space ids
      Returns:
      lsit of activity entities
    • getUserSpacesActivityIds

      List<String> getUserSpacesActivityIds(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      offset - the start index
      limit - max number ids to load
      spaceIds - list of space ids
      Returns:
      list of activity ids
    • getNumberOfUserSpacesActivities

      int getNumberOfUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      spaceIds - list of space ids
      Returns:
      the number of activities
    • getNewerOnUserSpacesActivities

      List<Long> getNewerOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the beginning time
      limit - max number item to load
      spaceIds - list of space ids
      Returns:
      list of activity entities
    • getNumberOfNewerOnUserSpacesActivities

      int getNumberOfNewerOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the beginning time
      spaceIds - list of space ids
      Returns:
      number of activities
    • getOlderOnUserSpacesActivities

      List<Long> getOlderOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the end time
      limit - max number items to load
      spaceIds - list of space ids
      Returns:
      list of activity entities
    • getNumberOfOlderOnUserSpacesActivities

      int getNumberOfOlderOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the end time
      spaceIds - list of space ids
      Returns:
      number of activities
    • getActivitiesOfConnections

      List<Long> getActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit)
      Parameters:
      ownerIdentity - the Identity
      offset - the start index
      limit - max number of items to load
      Returns:
      list of activity entities
    • getActivityIdsOfConnections

      List<String> getActivityIdsOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit)
      Parameters:
      ownerIdentity - the Identity
      offset - the start index
      limit - max number items to load
      Returns:
      list of activity Ids
    • getNumberOfActivitiesOfConnections

      int getNumberOfActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity)
      Parameters:
      ownerIdentity - the Identity
      Returns:
      number of activities
    • getNewerOnActivitiesOfConnections

      List<Long> getNewerOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, long limit)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the beginning time
      limit - max number items to load
      Returns:
      list of activity entities
    • getNumberOfNewerOnActivitiesOfConnections

      int getNumberOfNewerOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the start time
      Returns:
      number of activities
    • getOlderOnActivitiesOfConnections

      List<Long> getOlderOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the end time
      limit - max items to load
      Returns:
      list of activity entities
    • getNumberOfOlderOnActivitiesOfConnections

      int getNumberOfOlderOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime)
      Parameters:
      ownerIdentity - the Identity
      sinceTime - the end time
      Returns:
      number of activities
    • getActivitiesByPoster

      List<Long> getActivitiesByPoster(org.exoplatform.social.core.identity.model.Identity posterIdentity, int offset, int limit, String... activityTypes)
      Parameters:
      posterIdentity - the Identity
      offset - the start index
      limit - max number items to load
      activityTypes - the activity Type
      Returns:
      list of activities
    • getNumberOfActivitiesByPoster

      int getNumberOfActivitiesByPoster(org.exoplatform.social.core.identity.model.Identity posterIdentity, String... activityTypes)
      Parameters:
      posterIdentity - the Identity
      activityTypes - the activity Type
      Returns:
      number of activities
    • getNumberOfComments

      long getNumberOfComments(long activityId)
      Parameters:
      activityId - the Id of activity
      Returns:
      number of comments
    • getComments

      List<ActivityEntity> getComments(long activityId, int offset, int limit, boolean sortDescending)
      Parameters:
      activityId - the Id of activity
      offset - the start index
      limit - max comments to load
      sortDescending -
      Returns:
      list of activity entities represent comment
    • getNewerComments

      List<ActivityEntity> getNewerComments(long activityId, Date sinceTime, int offset, int limit)
      Parameters:
      activityId - the id of activity
      sinceTime - the start time
      offset - the start index
      limit - max items to load
      Returns:
      list of activity entities
    • getOlderComments

      List<ActivityEntity> getOlderComments(long activityId, Date sinceTime, int offset, int limit)
      Parameters:
      activityId - the Id of activity
      sinceTime - the end time
      offset - the start index
      limit - max items to load
      Returns:
      list of activity entities
    • getParentActivity

      ActivityEntity getParentActivity(long commentId)
      Get Activity of comment
      Parameters:
      commentId - the comment Id
      Returns:
      activity entity
    • getAllActivities

      List<ActivityEntity> getAllActivities()
      Returns:
      all activities
    • deleteActivitiesByOwnerId

      void deleteActivitiesByOwnerId(String ownerId)
      delete an activity by ownerId
      Parameters:
      ownerId - the owner Id
    • findCommentsOfActivities

      List<ActivityEntity> findCommentsOfActivities(List<Long> ids)
      find Sub Comments of some comments
      Parameters:
      ids -
      Returns:
    • findCommentsAndSubCommentsOfActivity

      List<ActivityEntity> findCommentsAndSubCommentsOfActivity(Long activityId)
      find comments and Sub Comments of some activity
      Parameters:
      activityId -
      Returns:
    • findActivities

      List<ActivityEntity> findActivities(List<Long> activityIds)
      Get list of activities switch list of IDs
      Parameters:
      activityIds -
      Returns:
    • getActivityCategoryIds

      List<Long> getActivityCategoryIds(long spaceIdentityId)
      Parameters:
      spaceIdentityId - Space Identity identifier
      Returns:
      List of Category Ids used in Activities