public class HibernateNotificationDao extends ConfluenceHibernateObjectDao<Notification> implements NotificationDaoInternal
HibernateObjectDao.Cacheability
cacheFactory, confluenceUserDao
Constructor and Description |
---|
HibernateNotificationDao() |
Modifier and Type | Method and Description |
---|---|
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.
|
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 |
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> |
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<Notification> |
getPersistentClass()
Gets the type of
EntityObject this Dao works with. |
boolean |
isWatchingContent(@NonNull ConfluenceUser user,
@NonNull ContentEntityObject content)
Returns true if the given user is directly watching the given content.
|
findAllSorted, findLatestVersionsCount, findLatestVersionsCount, findLatestVersionsIterator, findLatestVersionsIterator, findNamedQueryStringParams, findNamedQueryStringParams, save, saveEntity, setCacheFactory, setConfluenceUserDao, updateEntityModificationData, updateModificationData
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findByClassIds, findByClassIdsFiltered, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSession, getSessionFactory, index, indexEntity, refresh, refreshEntity, reIndex, reIndexEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity, setEventPublisher, setHibernateTemplate, setIndexer, setSessionFactory, unIndex, unIndexEntity, uniqueResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findAll, findAllSorted, findAllSorted, findByClassIds, findByClassIdsFiltered, refresh, refreshEntity, remove, removeEntity, replicate, replicateEntity, save, saveEntity, saveRaw, saveRawEntity
public List<Notification> findNotificationsByUser(com.atlassian.user.User user)
NotificationDao
findNotificationsByUser
in interface NotificationDao
public List<Notification> findAllNotificationsByUser(com.atlassian.user.User user)
NotificationDao
findAllNotificationsByUser
in interface NotificationDao
public List<Notification> findAllNotificationsBySpace(Space space)
NotificationDao
findAllNotificationsBySpace
in interface NotificationDao
public Iterable<Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
NotificationDao
findPageAndSpaceNotificationIdsFromSpace
in interface NotificationDao
space
- a space to find the notifications forpublic List<Notification> findNotificationsBySpaceAndType(Space space, ContentTypeEnum type)
NotificationDao
findNotificationsBySpaceAndType
in interface NotificationDao
public Notification findNotificationByUserAndSpace(com.atlassian.user.User user, Space space)
NotificationDao
findNotificationByUserAndSpace
in interface NotificationDao
public Notification findNotificationByUserAndContent(com.atlassian.user.User user, ContentEntityObject content)
NotificationDao
findNotificationByUserAndContent
in interface NotificationDao
public List<Notification> findNotificationsByContent(ContentEntityObject content)
findNotificationsByContent
in interface NotificationDao
public Notification findNotificationByUserAndLabel(com.atlassian.user.User user, Label label)
NotificationDao
findNotificationByUserAndLabel
in interface NotificationDao
public List<Notification> findNotificationsByLabel(Label label)
findNotificationsByLabel
in interface NotificationDao
public Notification findNotificationByUserAndSpace(com.atlassian.user.User user, String spaceKey)
NotificationDao
findNotificationByUserAndSpace
in interface NotificationDao
public Notification findNotificationByUserAndSpaceAndType(com.atlassian.user.User user, Space space, ContentTypeEnum type)
NotificationDao
findNotificationByUserAndSpaceAndType
in interface NotificationDao
public Notification findDailyReportNotification(String username)
NotificationDao
findDailyReportNotification
in interface NotificationDao
public List<Notification> findAllDailyReportNotifications()
NotificationDao
findAllDailyReportNotifications
in interface NotificationDao
public Notification findGlobalBlogWatchForUser(com.atlassian.user.User user)
findGlobalBlogWatchForUser
in interface NotificationDao
public Notification findNetworkNotificationByUser(com.atlassian.user.User user)
findNetworkNotificationByUser
in interface NotificationDao
public List<Notification> findSiteBlogNotifications()
NotificationDao
findSiteBlogNotifications
in interface NotificationDao
public List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
findNotificationsByFollowing
in interface NotificationDao
public boolean isWatchingContent(@NonNull ConfluenceUser user, @NonNull ContentEntityObject content)
NotificationDao
isWatchingContent
in interface NotificationDao
user
- user to checkcontent
- content to checkpublic Class<Notification> getPersistentClass()
ObjectDaoInternal
EntityObject
this Dao works with.getPersistentClass
in interface ObjectDao
getPersistentClass
in interface ObjectDaoInternal<Notification>
Copyright © 2003–2021 Atlassian. All rights reserved.