public class HibSubscriptionDaoImpl extends com.jamasoftware.contour.data.util.hibernate4.HibernateDaoSupport implements SubscriptionDao
Constructor and Description |
---|
HibSubscriptionDaoImpl() |
public void deleteSubscription(Subscription sub)
deleteSubscription
in interface SubscriptionDao
public Subscription getSubscription(Integer subId)
getSubscription
in interface SubscriptionDao
public List<Subscription> getSubscriptionList()
getSubscriptionList
in interface SubscriptionDao
public List<Subscription> getSubscriptionListBySubscriber(Subscriber subscriber)
SubscriptionDao
getSubscriptionListBySubscriber
in interface SubscriptionDao
subscriber
- either a user or a group.public List<Subscription> getSubscriptionListBySubscriber(Subscriber subscriber, boolean includeReviewSubscription)
SubscriptionDao
getSubscriptionListBySubscriber
in interface SubscriptionDao
subscriber
- either a user or a group.includeReviewSubscription
- whether to include the review item subscriptions.public List<Subscription> getSubscriptionListBySubscriberAndProject(Subscriber subscriber, Integer projectId)
getSubscriptionListBySubscriberAndProject
in interface SubscriptionDao
public boolean isSubscribedTo(Subscriber subscriber, Integer scope, Integer refId, boolean directSubscriptionsOnly)
isSubscribedTo
in interface SubscriptionDao
public boolean isSubscribedTo(Subscriber subscriber, Integer projectId, Integer scope, Integer refId)
isSubscribedTo
in interface SubscriptionDao
public boolean isSubscribedTo(Subscriber subscriber, Integer scope, Integer refId, Integer contextScopeId, Integer contextId, boolean directSubscriptionsOnly)
isSubscribedTo
in interface SubscriptionDao
public List<Integer> getSubscriptionIdsForScopeAndRef(Integer scopeId, Integer refId)
getSubscriptionIdsForScopeAndRef
in interface SubscriptionDao
public List<Subscription> getSubscribersSubscribedTo(Map<Integer,Integer> scopeMap, boolean directSubscriptionsOnly)
getSubscribersSubscribedTo
in interface SubscriptionDao
public List<User_JobSchedule> getUserJobSchedulesByJob(Integer jobId)
getUserJobSchedulesByJob
in interface SubscriptionDao
public List<User_JobSchedule> getUserJobSchedulesByUser(Integer userId)
getUserJobSchedulesByUser
in interface SubscriptionDao
public void saveSubscription(Subscription sub)
saveSubscription
in interface SubscriptionDao
public List<Subscription> getSubscriptionBasedOnMeta(Subscriber subscriber, Integer scope, Integer refId, boolean directSubscriptionsOnly)
getSubscriptionBasedOnMeta
in interface SubscriptionDao
public List<User> getSubscribedUsersToNotify(Integer docId, Integer parentDocId, Integer projectId)
getSubscribedUsersToNotify
in interface SubscriptionDao
public List<Role> getSubscribedGroupsToNotify(Integer docId, Integer parentDocumentId, Integer projectId)
getSubscribedGroupsToNotify
in interface SubscriptionDao
public List<User> getDirectlySubscribedUsers(Integer scopeId, Integer refId, Boolean selfSubscribed)
getDirectlySubscribedUsers
in interface SubscriptionDao
public List<Role> getDirectlySubscribedGroups(Integer scopeId, Integer refId)
getDirectlySubscribedGroups
in interface SubscriptionDao
public List<Subscription> getSubscriptionBasedOnMeta(Subscriber subscriber, Integer scope, Integer refId, Integer contextScopeId, Integer contextId, boolean directSubscriptionsOnly)
getSubscriptionBasedOnMeta
in interface SubscriptionDao
public List<Integer> getSubscribedRevisionItemIds(Integer revisionId, Integer userId)
SubscriptionDao
Revision_Item
s that the given user is following for the given revision. Note that
subscriptions are based on current Document
ids and are scoped at the Review
level, so this dao
method traverses the object graph (in an efficient way) to obtain revision items that point to origin documents
that are what the Subscription
ref ids point to, in the review context scope for the review associated
with the given revision id, and only for subscriptions associated with the given user id.getSubscribedRevisionItemIds
in interface SubscriptionDao
revisionId
- The id of a Revision
userId
- The id of a User
Revision_Item
ids that this User
is following for the given Revision
public List<User> getUsersSubscribedToRevisionItem(Integer revisionItemId)
getUsersSubscribedToRevisionItem
in interface SubscriptionDao
public List<Subscription> getSubscriptionsForItemsInContext(Integer contextScopeId, Integer contextId, Integer userId)
getSubscriptionsForItemsInContext
in interface SubscriptionDao
public List<Subscription> getSubscriptionsForScopeIds(Integer scope, List<Integer> ids)
getSubscriptionsForScopeIds
in interface SubscriptionDao
public List<Subscription> getSubscriptionsForScopeIdsAndSubscriber(Integer scope, List<Integer> ids, Subscriber subscriber, Integer contextScopeId, Integer contextId)
getSubscriptionsForScopeIdsAndSubscriber
in interface SubscriptionDao
public List<Integer> getSubscriptionIdsBySubscribers(List<Integer> roleIds, List<Integer> userIds, boolean isUser)
getSubscriptionIdsBySubscribers
in interface SubscriptionDao
public void activateAllReviewSubscriptions(Integer reviewId, Integer userId)
activateAllReviewSubscriptions
in interface SubscriptionDao
public void deactivateAllReviewSubscriptions(Integer reviewId, Integer userId)
deactivateAllReviewSubscriptions
in interface SubscriptionDao
Copyright (c) 2013-2014 Jama Software, Inc. All Rights Reserved.