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
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
HibernateNotificationDao()
           
 
Method Summary
 List<Notification> findAllDailyReportNotifications()
          Find all daily report notifications.
 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 findNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
           
 Notification findNotificationByUserAndSpace(com.atlassian.user.User user, String spaceKey)
           
 List<Notification> findNotificationsByFollowing(com.atlassian.user.User user)
           
 List<Notification> findNotificationsByPage(AbstractPage page)
          Find the notifications linked to the specified content.
 List<Notification> findNotificationsBySpace(Space space)
          Find the notifications links to the specified space.
 List<Notification> findNotificationsByUser(com.atlassian.user.User user)
          Find the space and page notifications owned by the specified user.
 List<Notification> findSiteBlogNotifications()
          Find the global blog notification for all users.
 Class getPersistentClass()
           
 void removeAllNotificationsForUser(com.atlassian.user.User user)
          Remove all the notifications for a particular user.
 void removeDailyReportNotificationForUser(String username)
           
 
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.ConfluenceHibernateObjectDao
findByQuery
 
Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.VersionedHibernateObjectDao
findAllSorted, findLatestVersionsCount, findLatestVersionsIterator, save, setCacheFactory, updateModificationData
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex
 
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, 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 links to the specified space.

Specified by:
findNotificationsBySpace 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,
                                                   String spaceKey)
Specified by:
findNotificationByUserAndSpace in interface NotificationDao

removeAllNotificationsForUser

public void removeAllNotificationsForUser(com.atlassian.user.User user)
Description copied from interface: NotificationDao
Remove all the notifications for a particular user. This will not include the daily report notifications

Specified by:
removeAllNotificationsForUser in interface NotificationDao
Parameters:
user - the user to remove all notifications for

removeDailyReportNotificationForUser

public void removeDailyReportNotificationForUser(String username)
Specified by:
removeDailyReportNotificationForUser 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-2010 Atlassian. All Rights Reserved.