public class NotificationService extends Object implements INotificationService
| Constructor and Description |
|---|
NotificationService() |
| Modifier and Type | Method and Description |
|---|---|
void |
create(Notification notification)
Create a new notification
|
void |
createListNotification(List<Notification> listNotifications)
Create a list of notification
|
Optional<Notification> |
findByPrimaryKey(int nIdNotification)
Find a notification by primary key
|
List<Notification> |
findNotificationsByUser(String nIdUser,
Integer nLimit)
Load all notification by user
|
void |
remove(int nIdNotification)
remove the notification
|
void |
updateReadStatus(int nIdNotification,
boolean isRead)
Update read status
|
public static final String BEAN_NAME
public void create(Notification notification)
create in interface INotificationServicenotification - the notificationpublic void createListNotification(List<Notification> listNotifications)
createListNotification in interface INotificationServicelistNotifications - the list of notificationpublic void updateReadStatus(int nIdNotification,
boolean isRead)
updateReadStatus in interface INotificationServicepublic Optional<Notification> findByPrimaryKey(int nIdNotification)
findByPrimaryKey in interface INotificationServicenIdNotification - the notification idpublic List<Notification> findNotificationsByUser(String nIdUser, Integer nLimit)
findNotificationsByUser in interface INotificationServicenIdUser - the user idnLimit - (set to null if you don't want a limit)public void remove(int nIdNotification)
remove in interface INotificationServicenIdNotification - the id of the notificationCopyright © 2022 City of Paris. All rights reserved.