public class NotificationService extends Object
Modifier | Constructor and Description |
---|---|
protected |
NotificationService()
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
create(Notification notification)
Create a notification
|
List<Notification> |
findAll()
Find all notifications
|
List<Notification> |
findByFilter(NotificationFilter nFilter)
Find notifications by a filter
|
Notification |
findByPrimaryKey(int nIdNotification)
Find the notification by its primary key
|
int |
getNumberNotifications(int nIdDemand)
Get the number of notifications of a demand
|
int |
getNumberUnreadNotifications(int nIdDemand)
Get the number of unread notifications of a demand
|
static NotificationService |
getService()
Get the instance of
NotificationService |
void |
remove(int nIdNotification)
Remove the notification
|
void |
removeByIdDemand(int nIdDemand)
Remove the notifications from a given ID demand
|
void |
update(Notification notification)
Update the notification
|
public static NotificationService getService()
NotificationService
NotificationService
public Notification findByPrimaryKey(int nIdNotification)
nIdNotification
- the id notificationNotification
public int create(Notification notification)
notification
- the notificationpublic void update(Notification notification)
notification
- the notificationpublic void remove(int nIdNotification)
nIdNotification
- the id notificationpublic void removeByIdDemand(int nIdDemand)
nIdDemand
- the id demandpublic List<Notification> findAll()
Notification
public List<Notification> findByFilter(NotificationFilter nFilter)
nFilter
- the filterNotification
public int getNumberUnreadNotifications(int nIdDemand)
nIdDemand
- the id demandpublic int getNumberNotifications(int nIdDemand)
nIdDemand
- the id demandCopyright © 2019 City of Paris. All rights reserved.