Class MockNotificationEventDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.grubusiness.business.mock.MockNotificationEventDAO
-
- All Implemented Interfaces:
INotificationEventDAO
public final class MockNotificationEventDAO extends 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 eventStringdeleteBeforeDate(long lDate)purge the events after N daysvoiddeleteByCustomerId(String strCustomerId)Delete by customer idNotificationEventinsert(NotificationEvent notificationEvent)Inserts a notification eventList<NotificationEvent>loadByDemand(String strDemandId, String strDemandTypeId)Finds notification events associated to the specified demand id and demand type id.List<NotificationEvent>loadByFilter(NotificationFilter filter)Finds and populate notification according to the filterOptional<NotificationEvent>loadById(int nKey)Finds notifications associated to the idList<NotificationEvent>loadByIds(List<Integer> listIds)load the events for an id listList<NotificationEvent>loadByNotification(String strDemandId, String strDemandTypeId, long lNotificationDate)Finds notification events associated to the specified notificationList<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 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 List<NotificationEvent> loadByDemand(String strDemandId, 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 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 List<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 List<NotificationEvent> loadByNotification(String strDemandId, 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 List<NotificationEvent> loadByIds(List<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 String deleteBeforeDate(long lDate)
Description copied from interface:INotificationEventDAOpurge the events after N days- Specified by:
deleteBeforeDatein interfaceINotificationEventDAO- Returns:
-
deleteByCustomerId
public void deleteByCustomerId(String strCustomerId)
Description copied from interface:INotificationEventDAODelete by customer id- Specified by:
deleteByCustomerIdin interfaceINotificationEventDAO
-
-