Class NotificationHome


  • public final class NotificationHome
    extends java.lang.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.Notification create​(fr.paris.lutece.plugins.grubusiness.business.notification.Notification notification)
      Create an instance of the Notification class
      static boolean existsNotificationWithDemandTypeId​(int nDemandTypeId)
      test if a notif exists with the specified demand_type_id
      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
      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
      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
      static java.util.List<java.lang.Integer> findIdsByFilter​(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)
      search notifications Ids by filter
      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
      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
      static java.util.Optional<fr.paris.lutece.plugins.grubusiness.business.notification.Notification> getById​(int id)
      Finds a notification with the specified id
      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
      static fr.paris.lutece.util.ReferenceList getDemandTypeIds()
      Get distinct demand type ids list
      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
      static void reassignNotifications​(java.lang.String strOldCustomerId, java.lang.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 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 -