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 Summary
Modifier and TypeMethodDescriptionvoiddeleteActivitiesByOwnerId(String ownerId) delete an activity by ownerIdfindActivities(List<Long> activityIds) Get list of activities switch list of IDsfindCommentsAndSubCommentsOfActivity(Long activityId) find comments and Sub Comments of some activityfindCommentsOfActivities(List<Long> ids) find Sub Comments of some commentsgetActivities(org.exoplatform.social.core.identity.model.Identity owner, org.exoplatform.social.core.identity.model.Identity viewer, long offset, long limit) getActivitiesByPoster(org.exoplatform.social.core.identity.model.Identity posterIdentity, int offset, int limit, String... activityTypes) default intgetActivitiesCountByFilter(org.exoplatform.social.core.activity.ActivityFilter activityFilter, List<String> spaceIdentityIds) getActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit) getActivityByFilter(org.exoplatform.social.core.activity.ActivityFilter activityFilter, List<String> spaceIdentityIds, int offset, int limit) getActivityCategoryIds(long spaceIdentityId) getActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds) getActivityIdsByFilter(org.exoplatform.social.core.activity.ActivityFilter activityFilter, List<String> spaceIdentityIds, int offset, int limit) getActivityIdsFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds) getActivityIdsOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit) getComments(long activityId, int offset, int limit, boolean sortDescending) getNewerComments(long activityId, Date sinceTime, int offset, int limit) getNewerOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, long limit) getNewerOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds) getNewerOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime, int limit) getNewerOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit) getNewerOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds) intgetNumberOfActivitesOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, List<String> spaceIds) intgetNumberOfActivitiesByPoster(org.exoplatform.social.core.identity.model.Identity posterIdentity, String... activityTypes) intgetNumberOfActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity) longgetNumberOfComments(long activityId) intgetNumberOfNewerOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime) intgetNumberOfNewerOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds) intgetNumberOfNewerOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime) intgetNumberOfNewerOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime) intgetNumberOfNewerOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds) intgetNumberOfOlderOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime) intgetNumberOfOlderOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds) intgetNumberOfOlderOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime) intgetNumberOfOlderOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime) intgetNumberOfOlderOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, List<String> spaceIds) intgetNumberOfSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity) intgetNumberOfUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity) intgetNumberOfUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, List<String> spaceIds) getOlderComments(long activityId, Date sinceTime, int offset, int limit) getOlderOnActivitiesOfConnections(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit) getOlderOnActivityFeed(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds) getOlderOnSpaceActivities(org.exoplatform.social.core.identity.model.Identity spaceIdentity, long sinceTime, int limit) getOlderOnUserActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit) getOlderOnUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, long sinceTime, int limit, List<String> spaceIds) getParentActivity(long commentId) Get Activity of commentgetSpaceActivities(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) getSpaceActivityIds(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) getUserActivities(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) getUserIdsActivities(org.exoplatform.social.core.identity.model.Identity owner, long offset, long limit) Gets Ids for User streamgetUserSpacesActivities(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds) getUserSpacesActivityIds(org.exoplatform.social.core.identity.model.Identity ownerIdentity, int offset, int limit, List<String> spaceIds) Methods inherited from interface org.exoplatform.commons.api.persistence.GenericDAO
count, create, createAll, delete, deleteAll, deleteAll, find, findAll, update, updateAll
-
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 identityoffset- the offset indexlimit- 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 Identityoffset- the offset indexlimit- 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 filterspaceIdentityIds- the space identity idsoffset- the offset indexlimit- 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 filterspaceIdentityIds- the space identity idsoffset- the offset indexlimit- 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 filterspaceIdentityIds- 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 IdentitysinceTime- the beginning timelimit- 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 IdentitysinceTime- 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 IdentitysinceTime- the ending timelimit- 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 IdentitysinceTime- 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 Identityoffset- the start indexlimit- 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 Identityoffset- the start indexlimit- 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 IdentitysinceTime- the beginning timelimit- 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 IdentitysinceTime- 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 IdentitysinceTime- the beginning timelimit- 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 IdentitysinceTime- 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 Identityviewer- the viewer Identityoffset- the start indexlimit- 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 Identityoffset- the start indexlimit- max number of entities to loadspaceIds- 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 Identityoffset- the start indexlimit- max number of ids to loadspaceIds- 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 IdentityspaceIds- 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 IdentitysinceTime- the beginning timelimit- max number of entities to loadspaceIds- 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 IdentitysinceTime- the beginning timespaceIds- 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 IdentitysinceTime- the end timelimit- max number entities to loadspaceIds- 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 IdentitysinceTime- the end timespaceIds- 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 Identityoffset- the start indexlimit- max number of entities to loadspaceIds- 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 Identityoffset- the start indexlimit- max number ids to loadspaceIds- 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 IdentityspaceIds- 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 IdentitysinceTime- the beginning timelimit- max number item to loadspaceIds- 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 IdentitysinceTime- the beginning timespaceIds- 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 IdentitysinceTime- the end timelimit- max number items to loadspaceIds- 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 IdentitysinceTime- the end timespaceIds- 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 Identityoffset- the start indexlimit- 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 Identityoffset- the start indexlimit- 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 IdentitysinceTime- the beginning timelimit- 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 IdentitysinceTime- 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 IdentitysinceTime- the end timelimit- 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 IdentitysinceTime- 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 Identityoffset- the start indexlimit- max number items to loadactivityTypes- the activity Type- Returns:
- list of activities
-
getNumberOfActivitiesByPoster
int getNumberOfActivitiesByPoster(org.exoplatform.social.core.identity.model.Identity posterIdentity, String... activityTypes) - Parameters:
posterIdentity- the IdentityactivityTypes- the activity Type- Returns:
- number of activities
-
getNumberOfComments
long getNumberOfComments(long activityId) - Parameters:
activityId- the Id of activity- Returns:
- number of comments
-
getComments
- Parameters:
activityId- the Id of activityoffset- the start indexlimit- max comments to loadsortDescending-- Returns:
- list of activity entities represent comment
-
getNewerComments
- Parameters:
activityId- the id of activitysinceTime- the start timeoffset- the start indexlimit- max items to load- Returns:
- list of activity entities
-
getOlderComments
- Parameters:
activityId- the Id of activitysinceTime- the end timeoffset- the start indexlimit- max items to load- Returns:
- list of activity entities
-
getParentActivity
Get Activity of comment- Parameters:
commentId- the comment Id- Returns:
- activity entity
-
getAllActivities
List<ActivityEntity> getAllActivities()- Returns:
- all activities
-
deleteActivitiesByOwnerId
delete an activity by ownerId- Parameters:
ownerId- the owner Id
-
findCommentsOfActivities
find Sub Comments of some comments- Parameters:
ids-- Returns:
-
findCommentsAndSubCommentsOfActivity
find comments and Sub Comments of some activity- Parameters:
activityId-- Returns:
-
findActivities
Get list of activities switch list of IDs- Parameters:
activityIds-- Returns:
-
getActivityCategoryIds
- Parameters:
spaceIdentityId- SpaceIdentityidentifier- Returns:
Listof Category Ids used in Activities
-