Class ThreadNotifications
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.cooler.ThreadNotifications
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,IDBean
,Cacheable
A bean to store notifications for a Water Cooler message thread.
- Since:
- 1.0
- Version:
- 4.2
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addUser
(int id) Adds a user to the notification list.void
Adds a user to the notification list.boolean
contains
(int id) Returns whether a particular user is signed up to receive notifications.getIDs()
Returns the database IDs of all users signed up for notifications.void
removeUser
(int id) Removes a user from the notification list.void
removeUser
(Person p) Removes a user from the notification list.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateID
-
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
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
Removes a user from the notification list.- Parameters:
p
- the Person- See Also:
-
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
-