Class NotificationHibernateDao

java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate5.support.HibernateDaoSupport
com.atlassian.bamboo.persistence.BambooHibernateObjectDao
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
  • Constructor Details

    • NotificationHibernateDao

      public NotificationHibernateDao()
  • Method Details

    • getPersistentClass

      public 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
    • saveNotificationSet

      public void saveNotificationSet(@NotNull @NotNull NotificationSet notificationSet)
      Description copied from interface: NotificationDao
      Save new/existing notification set.
      Specified by:
      saveNotificationSet in interface NotificationDao
      Parameters:
      notificationSet - New or existing notification set. Must be an instance of EntityObject.
    • getNotificationRulesForRecipients

      @NotNull public @NotNull List<UsersNotification> getNotificationRulesForRecipients(@NotNull @NotNull String recipientType, @NotNull @NotNull Collection<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:
      List of user notifications
    • getWatcherNotificationRulesForRecipientUsername

      @NotNull public @NotNull List<UsersNotification> getWatcherNotificationRulesForRecipientUsername(@NotNull @NotNull String recipientUsername)
      Description copied from interface: NotificationDao
      Retrieve all watcher recipient type notification rules for a given recipient username.
      Specified by:
      getWatcherNotificationRulesForRecipientUsername in interface NotificationDao
      Parameters:
      recipientUsername - Username value to match
      Returns:
      List of user notifications
    • getNotificationSetsForType

      @NotNull public @NotNull 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.
    • getNotificationSetForId

      @Nullable public @Nullable NotificationSet getNotificationSetForId(long notificationSetId)
      Description copied from interface: NotificationDao
      Retrieve notification set belonging to a specific id.
      Specified by:
      getNotificationSetForId in interface NotificationDao
      Parameters:
      notificationSetId - of the searched entity
      Returns:
      Found notificationSet.