Class MockDemandDAO
java.lang.Object
fr.paris.lutece.plugins.grubusiness.business.mock.MockDemandDAO
- All Implemented Interfaces:
IDemandDAO
This class is a mock implementation of
IDemandDAO-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes a demand with the specified id and type idvoiddeleteByUid(int nUid) Deletes a demand with the specified uidInsert a demandload(int nId) Finds a demand with the specified id and type idLoad the ids of the demandsloadByCustomerId(String strCustomerId) Finds the demands associated to the specified customer idloadByDemandId(String strId) Finds demands associated to the demand idloadByDemandIdAndTypeIdAndCustomerId(String strDemandId, String strDemandTypeId, String strCustomerID) Finds demands associated to the demand id and type idloadByFilter(NotificationFilter filter) Search demands by filterload demands corresponding to the id listloadByReference(String strReference) Finds the demands associated to the specified referenceloadIdsByCustomerIdAndIdDemandType(String strCustomerId, String strNotificationType, String strIdDemandType) Load demand ids ordered by date notificationloadIdsByCustomerIdAndIdDemandType(String strCustomerId, String strNotificationType, String strIdDemandType, String strDirectionDateOrderBy) Load demand ids ordered by date notificationloadIdsByFilter(NotificationFilter filter) Search demands by filterloadIdsByStatus(String strCustomerId, List<String> listStatus, String strNotificationType, String strIdDemandType) Load demand ids by statusvoidreassignDemands(String strOldCustomerId, String strNewCustomerId) Reassign demandsStores a demandvoidupdateDemandsStatusId(int nStatusId, int nTemporaryStatusId) Update demands status id
-
Constructor Details
-
MockDemandDAO
public MockDemandDAO()
-
-
Method Details
-
loadByCustomerId
Finds the demands associated to the specified customer id- Specified by:
loadByCustomerIdin interfaceIDemandDAO- Parameters:
strCustomerId- the customer id- Returns:
- the demands. An empty collection is returned if no demands has been found.
-
loadByReference
Finds the demands associated to the specified reference- Specified by:
loadByReferencein interfaceIDemandDAO- Parameters:
strReference- the reference- Returns:
- the demands. An empty collection is returned if no demands has been found.
-
load
Finds a demand with the specified id and type id- Specified by:
loadin interfaceIDemandDAO- Returns:
- the demand if found,
nullotherwise
-
loadByDemandIdAndTypeIdAndCustomerId
public Demand loadByDemandIdAndTypeIdAndCustomerId(String strDemandId, String strDemandTypeId, String strCustomerID) Finds demands associated to the demand id and type id- Specified by:
loadByDemandIdAndTypeIdAndCustomerIdin interfaceIDemandDAO- Returns:
- the demand coresponding to given demand id.
-
insert
Insert a demand- Specified by:
insertin interfaceIDemandDAO- Parameters:
demand- the demand to insert- Returns:
- the inserted demand
-
store
Stores a demand- Specified by:
storein interfaceIDemandDAO- Parameters:
demand- the demand to store- Returns:
- the stored demand
-
delete
Deletes a demand with the specified id and type id- Specified by:
deletein interfaceIDemandDAO- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id
-
loadAllIds
Load the ids of the demands- Specified by:
loadAllIdsin interfaceIDemandDAO- Returns:
- The list of demand ids
-
loadByDemandId
Finds demands associated to the demand id- Specified by:
loadByDemandIdin interfaceIDemandDAO- Returns:
- the demand coresponding to given demand id.
-
loadByFilter
Description copied from interface:IDemandDAOSearch demands by filter- Specified by:
loadByFilterin interfaceIDemandDAO- Returns:
- the demands list
-
loadIdsByFilter
Description copied from interface:IDemandDAOSearch demands by filter- Specified by:
loadIdsByFilterin interfaceIDemandDAO- Returns:
- the demands list
-
loadByIds
Description copied from interface:IDemandDAOload demands corresponding to the id list- Specified by:
loadByIdsin interfaceIDemandDAO- Returns:
- the demands
-
loadIdsByCustomerIdAndIdDemandType
public List<Integer> loadIdsByCustomerIdAndIdDemandType(String strCustomerId, String strNotificationType, String strIdDemandType) Description copied from interface:IDemandDAOLoad demand ids ordered by date notification- Specified by:
loadIdsByCustomerIdAndIdDemandTypein interfaceIDemandDAOstrIdDemandType- (Optional can be null)- Returns:
- The list of demand ids
-
loadIdsByCustomerIdAndIdDemandType
public List<Integer> loadIdsByCustomerIdAndIdDemandType(String strCustomerId, String strNotificationType, String strIdDemandType, String strDirectionDateOrderBy) Description copied from interface:IDemandDAOLoad demand ids ordered by date notification- Specified by:
loadIdsByCustomerIdAndIdDemandTypein interfaceIDemandDAOstrIdDemandType- (Optional can be null)strDirectionDateOrderBy- (Optional can be null)- Returns:
- The list of demand ids
-
loadIdsByStatus
public List<Integer> loadIdsByStatus(String strCustomerId, List<String> listStatus, String strNotificationType, String strIdDemandType) Description copied from interface:IDemandDAOLoad demand ids by status- Specified by:
loadIdsByStatusin interfaceIDemandDAOstrIdDemandType- (Optional can be null)- Returns:
- The list of demand ids
-
deleteByUid
public void deleteByUid(int nUid) Description copied from interface:IDemandDAODeletes a demand with the specified uid- Specified by:
deleteByUidin interfaceIDemandDAO- Parameters:
nUid- the uid
-
updateDemandsStatusId
public void updateDemandsStatusId(int nStatusId, int nTemporaryStatusId) Description copied from interface:IDemandDAOUpdate demands status id- Specified by:
updateDemandsStatusIdin interfaceIDemandDAO- Parameters:
nStatusId- the new status idnTemporaryStatusId- To find Demands that are linked to notifications that have the temporary status in parameter
-
reassignDemands
Description copied from interface:IDemandDAOReassign demands- Specified by:
reassignDemandsin interfaceIDemandDAO
-