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.
|
@NotNull List<UsersNotification> |
getNotificationRulesForRecipients(@NotNull String recipientType,
@NotNull Collection<String> recipients)
Retrieve all notification rules of a specific type matching the given list of recipient values.
|
@NotNull List<UsersNotification> |
getNotificationRulesForRecipientType(String recipientType)
Retrieve All notification rules with a specific recipient type (useful for retrieveing watchers and committers)
|
@Nullable NotificationSet |
getNotificationSetForId(long notificationSetId)
Retrieve notification set belonging to a specific id.
|
@NotNull List<NotificationSet> |
getNotificationSetsForType(NotificationSet.NotificationSetType type)
Retrieve notification sets belonging to a specific type.
|
Class |
getPersistentClass() |
@NotNull List<UsersNotification> |
getWatcherNotificationRulesForRecipientUsername(@NotNull String recipientUsername)
Retrieve all watcher recipient type notification rules for a given recipient username.
|
void |
saveNotificationRule(NotificationRule newRule)
Save new/existing notification rule
|
void |
saveNotificationSet(@NotNull NotificationSet notificationSet)
Save new/existing notification set.
|
findAll, findAllSorted, findById, findById, refresh, remove, replicate, save, saveRaw, 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 @NotNull NotificationSet notificationSet)
NotificationDao
saveNotificationSet
in interface NotificationDao
notificationSet
- New or existing notification set. Must be an instance of EntityObject
.@NotNull public @NotNull List<UsersNotification> getNotificationRulesForRecipients(@NotNull @NotNull String recipientType, @NotNull @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 @NotNull List<UsersNotification> getNotificationRulesForRecipientType(String recipientType)
NotificationDao
getNotificationRulesForRecipientType
in interface NotificationDao
@NotNull public @NotNull List<UsersNotification> getWatcherNotificationRulesForRecipientUsername(@NotNull @NotNull String recipientUsername)
NotificationDao
getWatcherNotificationRulesForRecipientUsername
in interface NotificationDao
recipientUsername
- Username value to match@NotNull public @NotNull List<NotificationSet> getNotificationSetsForType(NotificationSet.NotificationSetType type)
NotificationDao
getNotificationSetsForType
in interface NotificationDao
type
- to be retrieved@Nullable public @Nullable NotificationSet getNotificationSetForId(long notificationSetId)
NotificationDao
getNotificationSetForId
in interface NotificationDao
notificationSetId
- of the searched entityCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.