Class MockNotificationDAO
java.lang.Object
fr.paris.lutece.plugins.grubusiness.business.mock.MockNotificationDAO
- All Implemented Interfaces:
INotificationDAO
This class is a mock implementation of
INotificationDAO-
Constructor Summary
Constructors -
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 nId) 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
-
Constructor Details
-
MockNotificationDAO
public MockNotificationDAO()
-
-
Method Details
-
loadByDemand
public List<Notification> loadByDemand(String strDemandId, String strDemandTypeId, String strCustomerID) Finds notifications associated to the specified demand id and demand type id. The notifications must be sorted by date descending- Specified by:
loadByDemandin interfaceINotificationDAO- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id- Returns:
- the notifications. An empty list is returned if no notification has been found.
-
loadByFilter
Finds and populate notification according to the filter- Specified by:
loadByFilterin interfaceINotificationDAO- Parameters:
notificationFilter- the filter- Returns:
- the notifications. An empty list is returned if no notification has been found.
-
insert
Inserts a notification- Specified by:
insertin interfaceINotificationDAO- Parameters:
notification- the notification to insert- Returns:
- the inserted notification
-
deleteByDemand
Deletes notifications associated to the specified demand id and demand type id- Specified by:
deleteByDemandin interfaceINotificationDAO- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id
-
loadIdsByFilter
Load the ids of the notification by filter- Specified by:
loadIdsByFilterin interfaceINotificationDAO- Parameters:
notificationFilter- The notification filter- Returns:
- The list of notifications ids
-
loadById
Finds notifications associated to the id- Specified by:
loadByIdin interfaceINotificationDAO- Returns:
- the notification coresponding to given id.
-
loadByDemandAndDate
public List<Notification> loadByDemandAndDate(String strDemandId, String strDemandTypeId, long lDate) Description copied from interface:INotificationDAOGet notification by demand ids and notification date- Specified by:
loadByDemandAndDatein interfaceINotificationDAO- Returns:
- the notification
-
loadDistinctDemandTypeIds
Description copied from interface:INotificationDAOload distinct demand type ids- Specified by:
loadDistinctDemandTypeIdsin interfaceINotificationDAO- Returns:
- the id list
-
loadByIds
Description copied from interface:INotificationDAOLoads list by Ids- Specified by:
loadByIdsin interfaceINotificationDAO- Returns:
- list of Notification
-
delete
public void delete(int id) Description copied from interface:INotificationDAOdelete notification- Specified by:
deletein interfaceINotificationDAO
-
loadByDemandIdTypeIdCustomerId
public List<Notification> loadByDemandIdTypeIdCustomerId(String strDemandId, String strDemandTypeId, String strCustomerId, NotificationFilter filter) Description copied from interface:INotificationDAOFinds and populate notification by demand id, type id, customer id- Specified by:
loadByDemandIdTypeIdCustomerIdin interfaceINotificationDAO- Returns:
- the notifications. An empty list is returned if no notification has been found.
-
loadLastNotifByDemandIdAndDemandTypeId
public Notification loadLastNotifByDemandIdAndDemandTypeId(String strDemandId, String strDemandTypeId) Description copied from interface:INotificationDAOFind last notification by demand id and demand type id- Specified by:
loadLastNotifByDemandIdAndDemandTypeIdin interfaceINotificationDAO- Returns:
- last notification
-
existsNotificationWithDemandTypeId
Description copied from interface:INotificationDAOtest if a notification exists for the specified demand_type_id- Specified by:
existsNotificationWithDemandTypeIdin interfaceINotificationDAO- Returns:
- true id exists
-
reassignNotifications
Description copied from interface:INotificationDAOReassign notifications- Specified by:
reassignNotificationsin interfaceINotificationDAO
-