public class DelegatingNotificationDao extends Object implements NotificationDao
| Modifier and Type | Field and Description |
|---|---|
protected NotificationDao |
delegate |
NON_CACHEABLE| Constructor and Description |
|---|
DelegatingNotificationDao(NotificationDao delegate) |
| Modifier and Type | Method and Description |
|---|---|
List |
findAll()
Find all objects currently persisted of a particular type.
|
List<Notification> |
findAllDailyReportNotifications()
Find all daily report notifications.
|
List<Notification> |
findAllNotificationsBySpace(Space space)
Find all notifications linked to the specified space regardless of type specified.
|
List<Notification> |
findAllNotificationsByUser(com.atlassian.user.User user)
Find all notifications owned by the specified user, including digest
etc.
|
List |
findAllSorted(String sortField)
Find all objects currently persisted of a particular type and sort results by named property.
|
List |
findAllSorted(String sortField,
boolean cacheable,
int offset,
int maxResultCount)
Find all objects currently persisted of a particular type and sort results by named property.
|
<T> PageResponse<T> |
findByClassIds(Iterable<Long> ids,
LimitedRequest limitedRequest,
com.google.common.base.Predicate<? super T> filter)
Find a list of objects from the same persistent class.
|
Notification |
findDailyReportNotification(String username)
Find the specified user's daily report notification.
|
Notification |
findGlobalBlogWatchForUser(com.atlassian.user.User user)
Find the global blog notification for this user if they have one.
|
Notification |
findNetworkNotificationByUser(com.atlassian.user.User user)
Find the Network notification for this user if they have one.
|
Notification |
findNotificationByUserAndContent(com.atlassian.user.User user,
ContentEntityObject content)
Find any user notification linked to the specified content.
|
Notification |
findNotificationByUserAndLabel(com.atlassian.user.User user,
Label label)
Find any user notification linked to the specified label.
|
Notification |
findNotificationByUserAndPage(com.atlassian.user.User user,
AbstractPage page) |
Notification |
findNotificationByUserAndSpace(com.atlassian.user.User user,
Space space)
Find any user notification linked to the specified space regardless of type.
|
Notification |
findNotificationByUserAndSpace(com.atlassian.user.User user,
String spaceKey)
Find any user notification linked to the specified space regardless of type.
|
Notification |
findNotificationByUserAndSpaceAndType(com.atlassian.user.User user,
Space space,
ContentTypeEnum type)
Find the user notification linked to the specified space with a type specified - may be null if watching the
whole space.
|
List<Notification> |
findNotificationsByContent(ContentEntityObject content) |
List<Notification> |
findNotificationsByFollowing(com.atlassian.user.User user) |
List<Notification> |
findNotificationsByLabel(Label label) |
List<Notification> |
findNotificationsByPage(AbstractPage Page)
Find the notifications linked to the specified content.
|
List<Notification> |
findNotificationsBySpace(Space space)
Deprecated.
Since 3.5 - This method name is ambiguous. Use
findNotificationsBySpaceAndType(Space, ContentTypeEnum) or
findAllNotificationsBySpace(Space). |
List<Notification> |
findNotificationsBySpaceAndType(Space space,
ContentTypeEnum type)
Find all notifications linked to the specified space for a certain type.
|
List<Notification> |
findNotificationsByUser(com.atlassian.user.User user)
Find the space and page notifications owned by the specified user.
|
Iterable<Long> |
findPageAndSpaceNotificationIdsFromSpace(Space space)
Retrieves ids for all notifications in a space.
|
List<Notification> |
findSiteBlogNotifications()
Find the global blog notification for all users.
|
Class |
getPersistentClass() |
boolean |
isWatchingContent(ConfluenceUser user,
ContentEntityObject content)
Returns true if the given user is directly watching the given content.
|
void |
refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
Refreshes the object again with the fresh data from db.
|
void |
remove(com.atlassian.core.bean.EntityObject object)
Remove object from persistence.
|
void |
replicate(Object objectToReplicate)
Replicate the object.
|
void |
save(com.atlassian.core.bean.EntityObject objectToSave) |
void |
saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
saves the object.
|
protected final NotificationDao delegate
public DelegatingNotificationDao(NotificationDao delegate)
public List<Notification> findNotificationsByUser(com.atlassian.user.User user)
NotificationDaofindNotificationsByUser in interface NotificationDaopublic List<Notification> findAllNotificationsByUser(com.atlassian.user.User user)
NotificationDaofindAllNotificationsByUser in interface NotificationDaopublic List<Notification> findNotificationsByPage(AbstractPage Page)
NotificationDaofindNotificationsByPage in interface NotificationDao@Deprecated public List<Notification> findNotificationsBySpace(Space space)
findNotificationsBySpaceAndType(Space, ContentTypeEnum) or
findAllNotificationsBySpace(Space).NotificationDaofindNotificationsBySpace in interface NotificationDaopublic List<Notification> findAllNotificationsBySpace(Space space)
NotificationDaofindAllNotificationsBySpace in interface NotificationDaopublic Iterable<Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
NotificationDaofindPageAndSpaceNotificationIdsFromSpace in interface NotificationDaospace - a space to find the notifications forpublic List<Notification> findNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
NotificationDaofindNotificationsBySpaceAndType in interface NotificationDaopublic Notification findNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
findNotificationByUserAndPage in interface NotificationDaopublic Notification findNotificationByUserAndSpace(com.atlassian.user.User user, String spaceKey)
NotificationDaofindNotificationByUserAndSpace in interface NotificationDaopublic Notification findNotificationByUserAndSpace(com.atlassian.user.User user, Space space)
NotificationDaofindNotificationByUserAndSpace in interface NotificationDaopublic Notification findNotificationByUserAndContent(com.atlassian.user.User user, ContentEntityObject content)
NotificationDaofindNotificationByUserAndContent in interface NotificationDaopublic List<Notification> findNotificationsByContent(ContentEntityObject content)
findNotificationsByContent in interface NotificationDaopublic Notification findNotificationByUserAndLabel(com.atlassian.user.User user, Label label)
NotificationDaofindNotificationByUserAndLabel in interface NotificationDaopublic List<Notification> findNotificationsByLabel(Label label)
findNotificationsByLabel in interface NotificationDaopublic Notification findNotificationByUserAndSpaceAndType(com.atlassian.user.User user, Space space, ContentTypeEnum type)
NotificationDaofindNotificationByUserAndSpaceAndType in interface NotificationDaopublic Notification findDailyReportNotification(String username)
NotificationDaofindDailyReportNotification in interface NotificationDaopublic List<Notification> findAllDailyReportNotifications()
NotificationDaofindAllDailyReportNotifications in interface NotificationDaopublic Notification findGlobalBlogWatchForUser(com.atlassian.user.User user)
NotificationDaofindGlobalBlogWatchForUser in interface NotificationDaopublic Notification findNetworkNotificationByUser(com.atlassian.user.User user)
NotificationDaofindNetworkNotificationByUser in interface NotificationDaopublic List<Notification> findSiteBlogNotifications()
NotificationDaofindSiteBlogNotifications in interface NotificationDaopublic List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
findNotificationsByFollowing in interface NotificationDaopublic boolean isWatchingContent(@Nonnull ConfluenceUser user, @Nonnull ContentEntityObject content)
NotificationDaoisWatchingContent in interface NotificationDaouser - user to checkcontent - content to checkpublic void remove(com.atlassian.core.bean.EntityObject object)
ObjectDaopublic void refresh(com.atlassian.core.bean.EntityObject objectToRrfresh)
ObjectDaopublic void replicate(Object objectToReplicate)
ObjectDao@Nonnull public List findAll()
ObjectDao@Nonnull public List findAllSorted(String sortField)
ObjectDaofindAllSorted in interface ObjectDaosortField - the name of the property to be sorted on. This should be null if no sorting is required.@Nonnull public List findAllSorted(String sortField, boolean cacheable, int offset, int maxResultCount)
ObjectDaofindAllSorted in interface ObjectDaosortField - the name of the property to be sorted on. This should be null if no sorting is required.cacheable - control whether the results should be cachedoffset - the index of the first result to be returnedmaxResultCount - the maximum number of results required. Use -1 to specify no limit.@Nonnull public <T> PageResponse<T> findByClassIds(Iterable<Long> ids, LimitedRequest limitedRequest, com.google.common.base.Predicate<? super T> filter)
ObjectDaofindByClassIds in interface ObjectDaoT - the type of entity to returnids - - the ids of the entities to findlimitedRequest - the pagination request defining the page size to fetchfilter - a predicate to do in memory filtering of the result set before returningpublic void save(com.atlassian.core.bean.EntityObject objectToSave)
public Class getPersistentClass()
getPersistentClass in interface ObjectDaopublic void saveRaw(com.atlassian.core.bean.EntityObject objectToSave)
ObjectDaoCopyright © 2003–2018 Atlassian. All rights reserved.