Class NotificationHibernateDao

    • Constructor Detail

      • NotificationHibernateDao

        public NotificationHibernateDao()
    • Method Detail

      • 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
      • 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
      • 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.