Class ThreadNotifications

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.cooler.ThreadNotifications
All Implemented Interfaces:
Serializable, Comparable<Object>, IDBean, Cacheable

public class ThreadNotifications extends DatabaseBean
A bean to store notifications for a Water Cooler message thread.
Since:
1.0
Version:
4.2
Author:
Luke
See Also:
  • Constructor Details

    • ThreadNotifications

      public ThreadNotifications(int id)
      Creates a new Thread Notifcation bean.
      Parameters:
      id - the message thread database ID
  • Method Details

    • addUser

      public void addUser(int id)
      Adds a user to the notification list.
      Parameters:
      id - the Person's database ID
      See Also:
    • addUser

      public void addUser(Person p)
      Adds a user to the notification list.
      Parameters:
      p - the Person
      See Also:
    • removeUser

      public void removeUser(int id)
      Removes a user from the notification list.
      Parameters:
      id - the Person's database ID
      See Also:
    • removeUser

      public void removeUser(Person p)
      Removes a user from the notification list.
      Parameters:
      p - the Person
      See Also:
    • getIDs

      public Collection<Integer> getIDs()
      Returns the database IDs of all users signed up for notifications.
      Returns:
      a Collection of Integers
    • contains

      public boolean contains(int id)
      Returns whether a particular user is signed up to receive notifications.
      Parameters:
      id - the Person's database ID
      Returns:
      TRUE if the Person is signed up, otherwise FALSE