com.atlassian.confluence.mail.notification.persistence.dao.hibernate
Class HibernateNotificationDao

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate.support.HibernateDaoSupport
          extended by com.atlassian.hibernate.HibernateObjectDao
              extended by com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
                  extended by com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
                      extended by com.atlassian.confluence.mail.notification.persistence.dao.hibernate.HibernateNotificationDao
All Implemented Interfaces:
ObjectDao, VersionedObjectDao, NotificationDao, org.springframework.beans.factory.InitializingBean

public class HibernateNotificationDao
extends ConfluenceHibernateObjectDao
implements NotificationDao


Field Summary
 
Fields inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
cacheFactory, confluenceUserDao
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Fields inherited from interface bucket.core.persistence.ObjectDao
NON_CACHEABLE
 
Constructor Summary
HibernateNotificationDao()
           
 
Method Summary
 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 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)
          Find the notifications linked to the specified space regardless of type specified.
 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()
           
 
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, findNamedQueryStringParams, save, setCacheFactory, setConfluenceUserDao, updateModificationData
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, uniqueResult
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, findAllSorted, refresh, remove, replicate, save, saveRaw
 

Constructor Detail

HibernateNotificationDao

public HibernateNotificationDao()
Method Detail

findNotificationsByUser

public List<Notification> findNotificationsByUser(com.atlassian.user.User user)
Description copied from interface: NotificationDao
Find the space and page notifications owned by the specified user.

Specified by:
findNotificationsByUser in interface NotificationDao
Returns:
a list of Notification objects.

findAllNotificationsByUser

public List<Notification> findAllNotificationsByUser(com.atlassian.user.User user)
Description copied from interface: NotificationDao
Find all notifications owned by the specified user, including digest etc.

Specified by:
findAllNotificationsByUser in interface NotificationDao
Returns:
a list of Notification objects.

findNotificationsByPage

public List<Notification> findNotificationsByPage(AbstractPage page)
Description copied from interface: NotificationDao
Find the notifications linked to the specified content.

Specified by:
findNotificationsByPage in interface NotificationDao
Returns:
a list of Notification objects.

findNotificationsBySpace

public List<Notification> findNotificationsBySpace(Space space)
Description copied from interface: NotificationDao
Find the notifications linked to the specified space regardless of type specified.

Specified by:
findNotificationsBySpace in interface NotificationDao
Returns:
a list of Notification objects.

findAllNotificationsBySpace

public List<Notification> findAllNotificationsBySpace(Space space)
Description copied from interface: NotificationDao
Find all notifications linked to the specified space regardless of type specified. This does not include notifications for pages in the space.

Specified by:
findAllNotificationsBySpace in interface NotificationDao
Returns:
a list of Notification objects.

findPageAndSpaceNotificationIdsFromSpace

public Iterable<Long> findPageAndSpaceNotificationIdsFromSpace(Space space)
Description copied from interface: NotificationDao
Retrieves ids for all notifications in a space. This is useful for large-scale operations such as space exports. The result includes all notifications for the space, including notifications for pages in the space.

Specified by:
findPageAndSpaceNotificationIdsFromSpace in interface NotificationDao
Parameters:
space - a space to find the notifications for
Returns:
ids of all the notifications in the space.

findNotificationsBySpaceAndType

public List<Notification> findNotificationsBySpaceAndType(Space space,
                                                          ContentTypeEnum type)
Description copied from interface: NotificationDao
Find all notifications linked to the specified space for a certain type.

Specified by:
findNotificationsBySpaceAndType in interface NotificationDao
Returns:
a list of Notification objects.

findNotificationByUserAndPage

public Notification findNotificationByUserAndPage(com.atlassian.user.User user,
                                                  AbstractPage page)
Specified by:
findNotificationByUserAndPage in interface NotificationDao

findNotificationByUserAndSpace

public Notification findNotificationByUserAndSpace(com.atlassian.user.User user,
                                                   Space space)
Description copied from interface: NotificationDao
Find any user notification linked to the specified space regardless of type.

Specified by:
findNotificationByUserAndSpace in interface NotificationDao

findNotificationByUserAndContent

public Notification findNotificationByUserAndContent(com.atlassian.user.User user,
                                                     ContentEntityObject content)
Description copied from interface: NotificationDao
Find any user notification linked to the specified content.

Specified by:
findNotificationByUserAndContent in interface NotificationDao

findNotificationsByContent

public List<Notification> findNotificationsByContent(ContentEntityObject content)
Specified by:
findNotificationsByContent in interface NotificationDao

findNotificationByUserAndLabel

public Notification findNotificationByUserAndLabel(com.atlassian.user.User user,
                                                   Label label)
Description copied from interface: NotificationDao
Find any user notification linked to the specified label.

Specified by:
findNotificationByUserAndLabel in interface NotificationDao

findNotificationsByLabel

public List<Notification> findNotificationsByLabel(Label label)
Specified by:
findNotificationsByLabel in interface NotificationDao

findNotificationByUserAndSpace

public Notification findNotificationByUserAndSpace(com.atlassian.user.User user,
                                                   String spaceKey)
Description copied from interface: NotificationDao
Find any user notification linked to the specified space regardless of type.

Specified by:
findNotificationByUserAndSpace in interface NotificationDao

findNotificationByUserAndSpaceAndType

public Notification findNotificationByUserAndSpaceAndType(com.atlassian.user.User user,
                                                          Space space,
                                                          ContentTypeEnum type)
Description copied from interface: NotificationDao
Find the user notification linked to the specified space with a type specified - may be null if watching the whole space.

Specified by:
findNotificationByUserAndSpaceAndType in interface NotificationDao

findDailyReportNotification

public Notification findDailyReportNotification(String username)
Description copied from interface: NotificationDao
Find the specified user's daily report notification.

Specified by:
findDailyReportNotification in interface NotificationDao
Returns:
a notification object or null if no daily report notification exists for the specified user.

findAllDailyReportNotifications

public List<Notification> findAllDailyReportNotifications()
Description copied from interface: NotificationDao
Find all daily report notifications. These notifications are not associated with a page OR a space.

Specified by:
findAllDailyReportNotifications in interface NotificationDao
Returns:
a list of notifications.

findGlobalBlogWatchForUser

public Notification findGlobalBlogWatchForUser(com.atlassian.user.User user)
Find the global blog notification for this user if they have one.

Specified by:
findGlobalBlogWatchForUser in interface NotificationDao

findNetworkNotificationByUser

public Notification findNetworkNotificationByUser(com.atlassian.user.User user)
Find the Network notification for this user if they have one.

Specified by:
findNetworkNotificationByUser in interface NotificationDao

findSiteBlogNotifications

public List<Notification> findSiteBlogNotifications()
Description copied from interface: NotificationDao
Find the global blog notification for all users.

Specified by:
findSiteBlogNotifications in interface NotificationDao

findNotificationsByFollowing

public List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
Specified by:
findNotificationsByFollowing in interface NotificationDao

getPersistentClass

public Class getPersistentClass()
Specified by:
getPersistentClass in interface ObjectDao


Copyright © 2003–2015 Atlassian. All rights reserved.