Interface INotificationDAO
- All Known Implementing Classes:
MockNotificationDAO
public interface INotificationDAO
This interface represents a data access object for Notification object
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete(int id) delete notificationvoiddeleteByDemand(String strDemandId, String strDemandTypeId, String strCustomerId) Deletes notifications associated to the specified demand id and demand type idbooleanexistsNotificationWithDemandTypeId(String strDemandTypeId) test if a notification exists for the specified demand_type_idinsert(Notification notification) Inserts a notificationloadByDemand(String strDemandId, String strDemandTypeId, String strCustomerId) Finds notifications associated to the specified demand id and demand type id.loadByDemandAndDate(String strDemandId, String strDemandTypeId, long lDate) Get notification by demand ids and notification dateloadByDemandIdTypeIdCustomerId(String strDemandId, String strDemandTypeId, String strCustomerId, NotificationFilter filter) Finds and populate notification by demand id, type id, customer idloadByFilter(NotificationFilter notificationFilter) Finds and populate notification according to the filterloadById(int id) Finds notifications associated to the idLoads list by Idsload distinct demand type idsloadIdsByFilter(NotificationFilter notificationFilter) Load the ids of the notification by filterloadLastNotifByDemandIdAndDemandTypeId(String strDemandId, String strDemandTypeId) Find last notification by demand id and demand type idvoidreassignNotifications(String strOldCustomerId, String strNewCustomerId) Reassign notifications
-
Method Details
-
loadById
Finds notifications associated to the id- Parameters:
strId-- Returns:
- the notification coresponding to given id.
-
loadByDemand
Finds notifications associated to the specified demand id and demand type id. The notifications must be sorted by date descending- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id- Returns:
- the notifications. An empty list is returned if no notification has been found.
-
loadByDemandAndDate
Get notification by demand ids and notification date- Parameters:
strDemandId-strDemandTypeId-lDate-- Returns:
- the notification
-
loadByFilter
Finds and populate notification according to the filter- Parameters:
notificationFilter- the filter- Returns:
- the notifications. An empty list is returned if no notification has been found.
-
loadByDemandIdTypeIdCustomerId
List<Notification> loadByDemandIdTypeIdCustomerId(String strDemandId, String strDemandTypeId, String strCustomerId, NotificationFilter filter) Finds and populate notification by demand id, type id, customer id- Parameters:
strDemandId-strDemandTypeId-strCustomerId-filter-- Returns:
- the notifications. An empty list is returned if no notification has been found.
-
loadLastNotifByDemandIdAndDemandTypeId
Find last notification by demand id and demand type id- Parameters:
strDemandId-strDemandTypeId-- Returns:
- last notification
-
insert
Inserts a notification- Parameters:
notification- the notification to insert- Returns:
- the inserted notification
-
deleteByDemand
Deletes notifications associated to the specified demand id and demand type id- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id
-
loadIdsByFilter
Load the ids of the notification by filter- Parameters:
notificationFilter- The notification filter- Returns:
- The list of notifications ids
-
loadDistinctDemandTypeIds
load distinct demand type ids- Returns:
- the id list
-
loadByIds
Loads list by Ids- Parameters:
listIds-- Returns:
- list of Notification
-
delete
void delete(int id) delete notification- Parameters:
id-
-
existsNotificationWithDemandTypeId
test if a notification exists for the specified demand_type_id- Parameters:
nDemandTypeId-- Returns:
- true id exists
-
reassignNotifications
Reassign notifications- Parameters:
strOldCustomerId-strNewCustomerId-
-