Class NotificationHome
- java.lang.Object
-
- fr.paris.lutece.plugins.notificationstore.business.NotificationHome
-
public final class NotificationHome extends java.lang.ObjectThis class provides instances management methods (create, find, ...) for Notification objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>findByDemand(java.lang.String strDemandId, java.lang.String strDemandTypeId, java.lang.String strCustomerId)Find the demand's notificationsstatic java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>findByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)search notifications by filterstatic java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>findByNotification(java.lang.String strDemandId, java.lang.String strDemandTypeId, long lDate)Find the notification by demand id's and datestatic java.util.List<java.lang.Integer>findIdsByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)search notifications Ids by filterstatic java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>getByDemandIdTypeIdCustomerId(java.lang.String strDemandId, java.lang.String strDemandTypeId, java.lang.String strCustomerId, fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)Find the notifications by demand id, type id, customer idstatic java.util.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 java.util.Optional<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>getById(int id)Finds a notification with the specified idstatic java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>getByIds(java.util.List<java.lang.Integer> listIds)Find the notifications according to the filterstatic fr.paris.lutece.util.ReferenceListgetDemandTypeIds()Get distinct demand type ids liststatic fr.paris.lutece.plugins.grubusiness.business.notification.NotificationgetLastNotifByDemandIdAndDemandTypeId(java.lang.String strDemandId, java.lang.String strDemandTypeId)Get last notification by demand id and demand type idstatic voidreassignNotifications(java.lang.String strOldCustomerId, java.lang.String strNewCustomerId)Reassign notificationsstatic voidremove(int nKey)Remove the Notification whose identifier is specified in parameter
-
-
-
Method Detail
-
findByDemand
public static java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> findByDemand(java.lang.String strDemandId, java.lang.String strDemandTypeId, java.lang.String strCustomerId)Find the demand's notifications- Parameters:
strDemandId-strDemandTypeId-- Returns:
- the notification list
-
findByNotification
public static java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> findByNotification(java.lang.String strDemandId, java.lang.String strDemandTypeId, long lDate)Find the notification by demand id's and date- Parameters:
strDemandId-strDemandTypeId-lDate-- Returns:
- the notification list
-
getById
public static java.util.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 java.util.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 java.util.List<java.lang.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 java.util.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 java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getByDemandIdTypeIdCustomerId(java.lang.String strDemandId, java.lang.String strDemandTypeId, java.lang.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
-
getByIds
public static java.util.List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getByIds(java.util.List<java.lang.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(java.lang.String strDemandId, java.lang.String strDemandTypeId)Get last notification by demand id and demand type id- Parameters:
strDemandId-strDemandTypeId-- Returns:
- last notification
-
reassignNotifications
public static void reassignNotifications(java.lang.String strOldCustomerId, java.lang.String strNewCustomerId)Reassign notifications- Parameters:
strOldCustomerId-strNewCustomerId-
-
-