Class MockNotificationEventDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.grubusiness.business.mock.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 Summary
Constructors Constructor Description MockNotificationEventDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nKey)delete a notification eventjava.lang.StringdeleteBeforeDate(long lDate)purge the events after N daysvoiddeleteByCustomerId(java.lang.String strCustomerId)Delete by customer idNotificationEventinsert(NotificationEvent notificationEvent)Inserts a notification eventjava.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.java.util.List<NotificationEvent>loadByFilter(NotificationFilter filter)Finds and populate notification according to the filterjava.util.Optional<NotificationEvent>loadById(int nKey)Finds notifications associated to the idjava.util.List<NotificationEvent>loadByIds(java.util.List<java.lang.Integer> listIds)load the events for an id listjava.util.List<NotificationEvent>loadByNotification(java.lang.String strDemandId, java.lang.String strDemandTypeId, long lNotificationDate)Finds notification events associated to the specified notificationjava.util.List<java.lang.Integer>loadIdsByFilter(NotificationFilter filter)Load the ids of the notification events by filter
-
-
-
Method Detail
-
insert
public NotificationEvent insert(NotificationEvent notificationEvent)
Inserts a notification event- Specified by:
insertin interfaceINotificationEventDAO- Parameters:
notificationEvent- the notification event to insert- Returns:
- the inserted notification event
-
loadById
public java.util.Optional<NotificationEvent> loadById(int nKey)
Finds notifications associated to the id- Specified by:
loadByIdin interfaceINotificationEventDAO- Returns:
- the notification corresponding to given id.
-
delete
public void delete(int nKey)
delete a notification event- Specified by:
deletein interfaceINotificationEventDAO
-
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:
loadByDemandin interfaceINotificationEventDAO- Parameters:
strDemandId- the demand idstrDemandTypeId- 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:
loadByFilterin interfaceINotificationEventDAO- 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:
loadIdsByFilterin interfaceINotificationEventDAO- 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:INotificationEventDAOFinds notification events associated to the specified notification- Specified by:
loadByNotificationin interfaceINotificationEventDAO- Returns:
- the notification event list
-
loadByIds
public java.util.List<NotificationEvent> loadByIds(java.util.List<java.lang.Integer> listIds)
Description copied from interface:INotificationEventDAOload the events for an id list- Specified by:
loadByIdsin interfaceINotificationEventDAO- Returns:
- The list of notification events
-
deleteBeforeDate
public java.lang.String deleteBeforeDate(long lDate)
Description copied from interface:INotificationEventDAOpurge the events after N days- Specified by:
deleteBeforeDatein interfaceINotificationEventDAO- Returns:
-
deleteByCustomerId
public void deleteByCustomerId(java.lang.String strCustomerId)
Description copied from interface:INotificationEventDAODelete by customer id- Specified by:
deleteByCustomerIdin interfaceINotificationEventDAO
-
-