fr.paris.lutece.plugins.crm.service.notification
Class NotificationService

java.lang.Object
  extended by fr.paris.lutece.plugins.crm.service.notification.NotificationService

public class NotificationService
extends Object

NotificationService


Constructor Summary
protected NotificationService()
          Constructor
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotificationService

protected NotificationService()
Constructor

Method Detail

getService

public static NotificationService getService()
Get the instance of NotificationService

Returns:
the instance of NotificationService

findByPrimaryKey

public Notification findByPrimaryKey(int nIdNotification)
Find the notification by its primary key

Parameters:
nIdNotification - the id notification
Returns:
a Notification

create

public int create(Notification notification)
Create a notification

Parameters:
notification - the notification
Returns:
the newly created notification id

update

public void update(Notification notification)
Update the notification

Parameters:
notification - the notification

remove

public void remove(int nIdNotification)
Remove the notification

Parameters:
nIdNotification - the id notification

removeByIdDemand

public void removeByIdDemand(int nIdDemand)
Remove the notifications from a given ID demand

Parameters:
nIdDemand - the id demand

findAll

public List<Notification> findAll()
Find all notifications

Returns:
a list of Notification

findByFilter

public List<Notification> findByFilter(NotificationFilter nFilter)
Find notifications by a filter

Parameters:
nFilter - the filter
Returns:
a list of Notification

getNumberUnreadNotifications

public int getNumberUnreadNotifications(int nIdDemand)
Get the number of unread notifications of a demand

Parameters:
nIdDemand - the id demand
Returns:
the number of unread notifications

getNumberNotifications

public int getNumberNotifications(int nIdDemand)
Get the number of notifications of a demand

Parameters:
nIdDemand - the id demand
Returns:
the number of notifications


Copyright © 2013 Mairie de Paris. All Rights Reserved.