Class MockNotificationEventDAO

  • All Implemented Interfaces:
    INotificationEventDAO

    public final class MockNotificationEventDAO
    extends java.lang.Object
    implements INotificationEventDAO
    This class provides Data Access methods for NotificationEvent objects
    • Constructor Detail

      • MockNotificationEventDAO

        public MockNotificationEventDAO()
    • Method Detail

      • loadById

        public java.util.Optional<NotificationEvent> loadById​(int nKey)
        Finds notifications associated to the id
        Specified by:
        loadById in interface INotificationEventDAO
        Returns:
        the notification corresponding to given id.
      • loadByDemand

        public java.util.List<NotificationEvent> loadByDemand​(java.lang.String strDemandId,
                                                              java.lang.String strDemandTypeId)
        Finds notification events associated to the specified demand id and demand type id.
        Specified by:
        loadByDemand in interface INotificationEventDAO
        Parameters:
        strDemandId - the demand id
        strDemandTypeId - the demand type id
        Returns:
        the notification event list
      • loadByFilter

        public java.util.List<NotificationEvent> loadByFilter​(NotificationFilter filter)
        Finds and populate notification according to the filter
        Specified by:
        loadByFilter in interface INotificationEventDAO
        Parameters:
        filter - the filter
        Returns:
        the notification events. An empty list is returned if no notificationevent has been found.
      • loadIdsByFilter

        public java.util.List<java.lang.Integer> loadIdsByFilter​(NotificationFilter filter)
        Load the ids of the notification events by filter
        Specified by:
        loadIdsByFilter in interface INotificationEventDAO
        Parameters:
        filter - The notification filter
        Returns:
        The list of notification event ids
      • loadByNotification

        public java.util.List<NotificationEvent> loadByNotification​(java.lang.String strDemandId,
                                                                    java.lang.String strDemandTypeId,
                                                                    long lNotificationDate)
        Description copied from interface: INotificationEventDAO
        Finds notification events associated to the specified notification
        Specified by:
        loadByNotification in interface INotificationEventDAO
        Returns:
        the notification event list