public class NotificationDAO extends Object implements INotificationDAO
| Constructor and Description |
|---|
NotificationDAO() |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(int nIdNotification)
Delete the notification
|
List<Notification> |
findNotificationsByUser(String strIdUser,
Integer nLimit)
Load all notification by user
|
void |
insert(Notification notification)
Insert a new notification
|
void |
insertListNotification(List<Notification> listNotifications)
Insert a list of notification
|
Optional<Notification> |
load(int nIdNotification)
Load a notification by id
|
void |
updateReadStatus(int nIdNotification,
boolean isRead)
Update read status
|
public void insert(Notification notification)
insert in interface INotificationDAOnotification - the notificationpublic void insertListNotification(List<Notification> listNotifications)
insertListNotification in interface INotificationDAOlistNotifications - the list of notificationpublic void updateReadStatus(int nIdNotification,
boolean isRead)
updateReadStatus in interface INotificationDAOpublic Optional<Notification> load(int nIdNotification)
load in interface INotificationDAOnIdNotification - the notification idpublic List<Notification> findNotificationsByUser(String strIdUser, Integer nLimit)
findNotificationsByUser in interface INotificationDAOstrIdUser - the user idnLimit - (set to null if you don't want a limit)public void delete(int nIdNotification)
delete in interface INotificationDAOnIdNotification - the id of the notificationCopyright © 2022 City of Paris. All rights reserved.