Class Notification
java.lang.Object
com.example.iconic_raffleevent.model.Notification
Represents a notification sent to a user about their lottery results or updates.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for creating an empty Notification object. -
Method Summary
Modifier and TypeMethodDescriptionGets the event ID associated with the notification.Gets the title of the event that the notification relates toGets the message content of the notification.Gets the unique identifier of the notification.Gets the type of notificationGets the user ID associated with the notification.boolean
isRead()
Checks if the notification has been read.void
setEventId
(String eventId) Sets the event ID for the notification.void
setEventTitle
(String eventTitle) Sets the eventTitle for the notificationvoid
setMessage
(String message) Sets the message content of the notification.void
setNotificationId
(String notificationId) Sets the unique identifier for the notification.void
setNotificationType
(String notificationType) Sets the notification typevoid
setRead
(boolean read) Sets the read status of the notification.void
Sets the user ID for the notification.
-
Constructor Details
-
Notification
public Notification()Default constructor for creating an empty Notification object.
-
-
Method Details
-
getNotificationId
Gets the unique identifier of the notification.- Returns:
- Return the notification ID as a String.
-
setNotificationId
Sets the unique identifier for the notification.- Parameters:
notificationId
- This is the unique ID to assign to the notification.
-
getUserId
Gets the user ID associated with the notification.- Returns:
- Return the user ID as a String.
-
setUserId
Sets the user ID for the notification.- Parameters:
userId
- This is the user ID to assign to the notification.
-
getEventId
Gets the event ID associated with the notification.- Returns:
- Return the event ID as a String.
-
setEventId
Sets the event ID for the notification.- Parameters:
eventId
- This is the event ID to assign to the notification.
-
getMessage
Gets the message content of the notification.- Returns:
- Return the notification message as a String.
-
setMessage
Sets the message content of the notification.- Parameters:
message
- This is the message to assign to the notification.
-
isRead
public boolean isRead()Checks if the notification has been read.- Returns:
- Return true if the notification is read, false if not.
-
setRead
public void setRead(boolean read) Sets the read status of the notification.- Parameters:
read
- This is the read status to assign to the notification.
-
setEventTitle
Sets the eventTitle for the notification- Parameters:
eventTitle
- Title of the event the notification relates to
-
getEventTitle
Gets the title of the event that the notification relates to- Returns:
- String title of event
-
getNotificationType
Gets the type of notification- Returns:
- String type of the notification
-
setNotificationType
Sets the notification type- Parameters:
notificationType
- type of notification
-