Class NotificationHome
java.lang.Object
fr.paris.lutece.plugins.notificationstore.business.NotificationHome
This class provides instances management methods (create, find, ...) for Notification objects
-
Method Summary
Modifier and TypeMethodDescriptionstatic fr.paris.lutece.plugins.grubusiness.business.notification.Notificationcreate(fr.paris.lutece.plugins.grubusiness.business.notification.Notification notification) Create an instance of the Notification classstatic booleanexistsNotificationWithDemandTypeId(int nDemandTypeId) test if a notif exists with the specified demand_type_idstatic List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>findByDemand(String strDemandId, String strDemandTypeId, String strCustomerId) Find the demand's notificationsstatic List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>findByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) search notifications by filterstatic List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>findByNotification(String strDemandId, String strDemandTypeId, long lDate) Find the notification by demand id's and datefindIdsByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) search notifications Ids by filterstatic List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>getByDemandIdTypeIdCustomerId(String strDemandId, String strDemandTypeId, String strCustomerId, fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) Find the notifications by demand id, type id, customer idstatic List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>getByDemandListAndCustomerId(List<Map<String, String>> listDemandPairs, String strCustomerId, fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) Find the notifications for a list of (demandId, demandTypeId) pairs and a customer idstatic List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>getByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter notificationFilter) Find the notifications according to the filterstatic Optional<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>getById(int id) Finds a notification with the specified idstatic List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>Find the notifications according to the filterstatic fr.paris.lutece.util.ReferenceListGet distinct demand type ids liststatic fr.paris.lutece.plugins.grubusiness.business.notification.NotificationgetLastNotifByDemandIdAndDemandTypeId(String strDemandId, String strDemandTypeId) Get last notification by demand id and demand type idstatic voidreassignNotifications(String strOldCustomerId, String strNewCustomerId) Reassign notificationsstatic voidremove(int nKey) Remove the Notification whose identifier is specified in parameter
-
Method Details
-
findByDemand
public static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> findByDemand(String strDemandId, String strDemandTypeId, String strCustomerId) Find the demand's notifications- Parameters:
strDemandId-strDemandTypeId-- Returns:
- the notification list
-
findByNotification
public static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> findByNotification(String strDemandId, String strDemandTypeId, long lDate) Find the notification by demand id's and date- Parameters:
strDemandId-strDemandTypeId-lDate-- Returns:
- the notification list
-
getById
public static Optional<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getById(int id) Finds a notification with the specified id- Parameters:
strId-- Returns:
- the notification
-
findByFilter
public static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> findByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) search notifications by filter- Parameters:
filter-- Returns:
- the notification list
-
findIdsByFilter
public static List<Integer> findIdsByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) search notifications Ids by filter- Parameters:
filter-- Returns:
- the notification list
-
getByFilter
public static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter notificationFilter) Find the notifications according to the filter- Parameters:
notificationFilter-- Returns:
- the notification list
-
getByDemandIdTypeIdCustomerId
public static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getByDemandIdTypeIdCustomerId(String strDemandId, String strDemandTypeId, String strCustomerId, fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) Find the notifications by demand id, type id, customer id- Parameters:
strDemandId-strDemandTypeId-strCustomerId-filter-- Returns:
- the notification list
-
getByDemandListAndCustomerId
public static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getByDemandListAndCustomerId(List<Map<String, String>> listDemandPairs, String strCustomerId, fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter) Find the notifications for a list of (demandId, demandTypeId) pairs and a customer id- Parameters:
listDemandPairs- list of maps with keys "demandId" and "demandTypeId"strCustomerId- the customer idfilter- the notification filter- Returns:
- the notification list
-
getByIds
public static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getByIds(List<Integer> listIds) Find the notifications according to the filter- Parameters:
notificationFilter-- Returns:
- the notification list
-
getDemandTypeIds
public static fr.paris.lutece.util.ReferenceList getDemandTypeIds()Get distinct demand type ids list- Returns:
- the list
-
create
public static fr.paris.lutece.plugins.grubusiness.business.notification.Notification create(fr.paris.lutece.plugins.grubusiness.business.notification.Notification notification) Create an instance of the Notification class- Parameters:
Notification- The instance of the Notification which contains the informations to store- Returns:
- The instance of Notification which has been created with its primary key.
-
remove
public static void remove(int nKey) Remove the Notification whose identifier is specified in parameter- Parameters:
nKey- The Notification Id
-
existsNotificationWithDemandTypeId
public static boolean existsNotificationWithDemandTypeId(int nDemandTypeId) test if a notif exists with the specified demand_type_id- Parameters:
nDemandTypeId-- Returns:
- true if exists
-
getLastNotifByDemandIdAndDemandTypeId
public static fr.paris.lutece.plugins.grubusiness.business.notification.Notification getLastNotifByDemandIdAndDemandTypeId(String strDemandId, String strDemandTypeId) Get last notification by demand id and demand type id- Parameters:
strDemandId-strDemandTypeId-- Returns:
- last notification
-
reassignNotifications
Reassign notifications- Parameters:
strOldCustomerId-strNewCustomerId-
-