com.atlassian.bamboo.notification
Class NotificationHibernateDao

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.bamboo.persistence.BambooHibernateObjectDao
                  extended by com.atlassian.bamboo.notification.NotificationHibernateDao
All Implemented Interfaces:
bucket.core.persistence.ObjectDao, NotificationDao, BambooObjectDao, org.springframework.beans.factory.InitializingBean

public class NotificationHibernateDao
extends BambooHibernateObjectDao
implements NotificationDao


Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
NotificationHibernateDao()
           
 
Method Summary
 void deleteNotification(NotificationRule rule)
          Used to remove a notification from db.
 java.util.List<UsersNotification> getNotificationRulesForRecipients(java.lang.String recipientType, java.util.Collection<java.lang.String> recipients)
          Retrieve all notification rules of a specific type matching the given list of recipient values.
 java.util.List<UsersNotification> getNotificationRulesForRecipientType(java.lang.String recipientType)
          Retrieve All notification rules with a specific recipient type (useful for retrieveing watchers and committers)
 java.util.List<NotificationSet> getNotificationSetsForType(NotificationSet.NotificationSetType type)
          Retrieve notification sets belonging to a specific type.
 java.lang.Class getPersistentClass()
           
 void saveNotificationRule(NotificationRule newRule)
          Save new/existing notification rule
 
Methods inherited from class com.atlassian.bamboo.persistence.BambooHibernateObjectDao
executeCountQuery, executeReturnLong, findById, findById
 
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, findSingleObject, getByClassId, index, refresh, reIndex, remove, replicate, save, saveRaw, setIndexer, unIndex, updateModificationData
 
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 com.atlassian.bamboo.persistence.BambooObjectDao
findById
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, refresh, remove, replicate, save, saveRaw
 

Constructor Detail

NotificationHibernateDao

public NotificationHibernateDao()
Method Detail

getPersistentClass

public java.lang.Class getPersistentClass()
Specified by:
getPersistentClass in interface bucket.core.persistence.ObjectDao

deleteNotification

public void deleteNotification(NotificationRule rule)
Description copied from interface: NotificationDao
Used to remove a notification from db. This should cascade to delete associated recipients

Specified by:
deleteNotification in interface NotificationDao
Parameters:
rule - Complete NotificationRule Object

saveNotificationRule

public void saveNotificationRule(NotificationRule newRule)
Description copied from interface: NotificationDao
Save new/existing notification rule

Specified by:
saveNotificationRule in interface NotificationDao
Parameters:
newRule - New or Existing NotificationRule Object

getNotificationRulesForRecipients

@NotNull
public java.util.List<UsersNotification> getNotificationRulesForRecipients(@NotNull
                                                                                   java.lang.String recipientType,
                                                                                   @NotNull
                                                                                   java.util.Collection<java.lang.String> recipients)
Description copied from interface: NotificationDao
Retrieve all notification rules of a specific type matching the given list of recipient values.

Specified by:
getNotificationRulesForRecipients in interface NotificationDao
Parameters:
recipientType - the key of the recipient type to search for
recipients - a list of values to match (eg email addresses, usernames etc)
Returns:

getNotificationRulesForRecipientType

@NotNull
public java.util.List<UsersNotification> getNotificationRulesForRecipientType(java.lang.String recipientType)
Description copied from interface: NotificationDao
Retrieve All notification rules with a specific recipient type (useful for retrieveing watchers and committers)

Specified by:
getNotificationRulesForRecipientType in interface NotificationDao
Returns:

getNotificationSetsForType

@NotNull
public java.util.List<NotificationSet> getNotificationSetsForType(NotificationSet.NotificationSetType type)
Description copied from interface: NotificationDao
Retrieve notification sets belonging to a specific type.

Specified by:
getNotificationSetsForType in interface NotificationDao
Parameters:
type - to be retrieved
Returns:
List of notification sets.


Copyright © 2010 Atlassian. All Rights Reserved.