Class NotificationHome
- java.lang.Object
-
- fr.paris.lutece.plugins.notificationstore.business.NotificationHome
-
public final class NotificationHome extends Object
This 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 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 datestatic List<Integer>findIdsByFilter(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>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>getByIds(List<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(String strDemandId, String strDemandTypeId)Get last notification by demand id and demand type idstatic voidremove(int nKey)Remove the Notification whose identifier is specified in parameter
-
-
-
Method Detail
-
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
-
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
-
-