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

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

public class HibernateNotificationDao
extends ConfluenceHibernateObjectDao
implements NotificationDao


Field Summary
 
Fields inherited from class bucket.core.persistence.hibernate.CachableHibernateObjectDao
cacheManager
 
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
logger
 
Constructor Summary
HibernateNotificationDao()
           
 
Method Summary
 List findAllDailyReportNotifications()
          Find all daily report notifications.
 Notification findDailyReportNotification(String username)
          Find the specified users daily report notification.
 Notification findNotificationByUserAndPage(User user, AbstractPage page)
           
 Notification findNotificationByUserAndSpace(User user, String spaceKey)
           
 List findNotificationsByPage(AbstractPage page)
          Find the notifications linked to the specified content.
 List findNotificationsBySpace(Space space)
          Find the notifications links to the specified space.
 List findNotificationsByUser(User user)
          Find the space and page notifications owned by the specified user.
 Class getPersistentClass()
           
 void removeAllNotificationsForUser(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, updateModificationData
 
Methods inherited from class bucket.core.persistence.hibernate.CachableHibernateObjectDao
setCacheManager
 
Methods inherited from class com.atlassian.hibernate.HibernateObjectDao
findAll, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, 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
afterPropertiesSet, closeSessionIfNecessary, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, initDao, setHibernateTemplate, setSessionFactory
 
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 findNotificationsByUser(User user)
Description copied from interface: NotificationDao
Find the space and page notifications owned by the specified user.

Specified by:
findNotificationsByUser in interface NotificationDao
Parameters:
user -
Returns:
a list of Notifcation objects.

findNotificationsByPage

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

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

findNotificationsBySpace

public List findNotificationsBySpace(Space space)
Description copied from interface: NotificationDao
Find the notifications links to the specified space.

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

findNotificationByUserAndPage

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

findNotificationByUserAndSpace

public Notification findNotificationByUserAndSpace(User user,
                                                   String spaceKey)
Specified by:
findNotificationByUserAndSpace in interface NotificationDao

removeAllNotificationsForUser

public void removeAllNotificationsForUser(User user)
Remove all the notifications for a particular user.

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 users daily report notification.

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

findAllDailyReportNotifications

public List 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.

getPersistentClass

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


Confluence is developed by Atlassian.