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:
bucket.core.persistence.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
 java.util.List findAllDailyReportNotifications()
          Find all daily report notifications.
 Notification findDailyReportNotification(java.lang.String username)
          Find the specified users daily report notification.
 Notification findNotificationByUserAndPage(com.atlassian.user.User user, AbstractPage page)
           
 Notification findNotificationByUserAndSpace(com.atlassian.user.User user, java.lang.String spaceKey)
           
 java.util.List findNotificationsByPage(AbstractPage page)
          Find the notifications linked to the specified content.
 java.util.List findNotificationsBySpace(Space space)
          Find the notifications links to the specified space.
 java.util.List findNotificationsByUser(com.atlassian.user.User user)
          Find the space and page notifications owned by the specified user.
 java.lang.Class getPersistentClass()
           
 void removeAllNotificationsForUser(com.atlassian.user.User user)
          Remove all the notifications for a particular user.
 void removeDailyReportNotificationForUser(java.lang.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, 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 java.util.List 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 Notifcation objects.

findNotificationsByPage

public java.util.List 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 java.util.List 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,
                                                   java.lang.String spaceKey)
Specified by:
findNotificationByUserAndSpace in interface NotificationDao

removeAllNotificationsForUser

public void removeAllNotificationsForUser(com.atlassian.user.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(java.lang.String username)
Specified by:
removeDailyReportNotificationForUser in interface NotificationDao

findDailyReportNotification

public Notification findDailyReportNotification(java.lang.String username)
Description copied from interface: NotificationDao
Find the specified users 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 java.util.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 java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface bucket.core.persistence.ObjectDao


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.