Interface INotificationEventDAO
-
- All Known Implementing Classes:
MockNotificationEventDAO
public interface INotificationEventDAOThis interface represents a data access object for Notification object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(int nId)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 notificationFilter)Finds and populate notification according to the filterjava.util.Optional<NotificationEvent>loadById(int nId)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 notificationFilter)Load the ids of the notification events by filter
-
-
-
Method Detail
-
loadById
java.util.Optional<NotificationEvent> loadById(int nId)
Finds notifications associated to the id- Parameters:
nId-- Returns:
- the notification corresponding to given id.
-
loadByDemand
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.- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id- Returns:
- the notification event list
-
loadByNotification
java.util.List<NotificationEvent> loadByNotification(java.lang.String strDemandId, java.lang.String strDemandTypeId, long lNotificationDate)
Finds notification events associated to the specified notification- Parameters:
strDemandId-strDemandTypeId-lNotificationDate-- Returns:
- the notification event list
-
loadByFilter
java.util.List<NotificationEvent> loadByFilter(NotificationFilter notificationFilter)
Finds and populate notification according to the filter- Parameters:
notificationFilter- the filter- Returns:
- the notification events. An empty list is returned if no notificationevent has been found.
-
insert
NotificationEvent insert(NotificationEvent notificationEvent)
Inserts a notification event- Parameters:
notificationEvent- the notification event to insert- Returns:
- the inserted notification event
-
delete
void delete(int nId)
delete a notification event- Parameters:
nId-
-
deleteByCustomerId
void deleteByCustomerId(java.lang.String strCustomerId)
Delete by customer id- Parameters:
strCustomerId-
-
loadIdsByFilter
java.util.List<java.lang.Integer> loadIdsByFilter(NotificationFilter notificationFilter)
Load the ids of the notification events by filter- Parameters:
notificationFilter- The notification filter- Returns:
- The list of notification event ids
-
loadByIds
java.util.List<NotificationEvent> loadByIds(java.util.List<java.lang.Integer> listIds)
load the events for an id list- Returns:
- The list of notification events
-
deleteBeforeDate
java.lang.String deleteBeforeDate(long lDate)
purge the events after N days- Parameters:
nbDays-- Returns:
-
-