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

    Modifier and Type
    Method
    Description
    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
    static boolean
    test if a notif exists with the specified demand_type_id
    static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>
    findByDemand(String strDemandId, String strDemandTypeId, String strCustomerId)
    Find the demand's notifications
    static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>
    findByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)
    search notifications by filter
    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
    static List<Integer>
    findIdsByFilter(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)
    search notifications Ids by filter
    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
    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
    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
    static Optional<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>
    getById(int id)
    Finds a notification with the specified id
    static List<fr.paris.lutece.plugins.grubusiness.business.notification.Notification>
    getByIds(List<Integer> listIds)
    Find the notifications according to the filter
    static fr.paris.lutece.util.ReferenceList
    Get distinct demand type ids list
    static fr.paris.lutece.plugins.grubusiness.business.notification.Notification
    getLastNotifByDemandIdAndDemandTypeId(String strDemandId, String strDemandTypeId)
    Get last notification by demand id and demand type id
    static void
    reassignNotifications(String strOldCustomerId, String strNewCustomerId)
    Reassign notifications
    static void
    remove(int nKey)
    Remove the Notification whose identifier is specified in parameter

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 id
      filter - 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

      public static void reassignNotifications(String strOldCustomerId, String strNewCustomerId)
      Reassign notifications
      Parameters:
      strOldCustomerId -
      strNewCustomerId -