public class NotificationHibernateDao extends BambooHibernateObjectDao implements NotificationDao
Constructor and Description |
---|
NotificationHibernateDao() |
Modifier and Type | Method and Description |
---|---|
void |
deleteNotification(NotificationRule rule)
Used to remove a notification from db.
|
List<UsersNotification> |
getNotificationRulesForRecipients(String recipientType,
Collection<String> recipients)
Retrieve all notification rules of a specific type matching the given list of recipient values.
|
List<UsersNotification> |
getNotificationRulesForRecipientType(String recipientType)
Retrieve All notification rules with a specific recipient type (useful for retrieveing watchers and committers)
|
List<NotificationSet> |
getNotificationSetsForType(NotificationSet.NotificationSetType type)
Retrieve notification sets belonging to a specific type.
|
Class |
getPersistentClass() |
void |
saveNotificationRule(NotificationRule newRule)
Save new/existing notification rule
|
void |
saveNotificationSet(NotificationSet notificationSet)
Save new/existing notification set.
|
findAll, findAllSorted, findById, findById, refresh, remove, replicate, save, saveRaw, setIndexer, updateModificationData
checkDaoConfig, createHibernateTemplate, currentSession, getHibernateTemplate, getSessionFactory, setHibernateTemplate, setSessionFactory
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findById
public Class getPersistentClass()
getPersistentClass
in interface bucket.core.persistence.ObjectDao
public void deleteNotification(NotificationRule rule)
NotificationDao
deleteNotification
in interface NotificationDao
rule
- Complete NotificationRule Objectpublic void saveNotificationRule(NotificationRule newRule)
NotificationDao
saveNotificationRule
in interface NotificationDao
newRule
- New or Existing NotificationRule Objectpublic void saveNotificationSet(@NotNull NotificationSet notificationSet)
NotificationDao
saveNotificationSet
in interface NotificationDao
notificationSet
- New or existing notification set. Must be an instance of EntityObject
.@NotNull public List<UsersNotification> getNotificationRulesForRecipients(@NotNull String recipientType, @NotNull Collection<String> recipients)
NotificationDao
getNotificationRulesForRecipients
in interface NotificationDao
recipientType
- the key of the recipient type to search forrecipients
- a list of values to match (eg email addresses, usernames etc)@NotNull public List<UsersNotification> getNotificationRulesForRecipientType(String recipientType)
NotificationDao
getNotificationRulesForRecipientType
in interface NotificationDao
@NotNull public List<NotificationSet> getNotificationSetsForType(NotificationSet.NotificationSetType type)
NotificationDao
getNotificationSetsForType
in interface NotificationDao
type
- to be retrievedCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.