Interface IDemandDAO
- All Known Implementing Classes:
MockDemandDAO
public interface IDemandDAO
This interface represents a data access object for Demand object
-
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 strDemandId) 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
-
Method Details
-
loadByCustomerId
Finds the demands associated to the specified customer id- 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- Parameters:
strReference- the reference- Returns:
- the demands. An empty collection is returned if no demands has been found.
-
loadByFilter
Search demands by filter- Parameters:
filter-- Returns:
- the demands list
-
loadIdsByFilter
Search demands by filter- Parameters:
filter-- Returns:
- the demands list
-
loadByIds
load demands corresponding to the id list- Parameters:
listIds-- Returns:
- the demands
-
load
Finds a demand with the specified id and type id- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id- Returns:
- the demand if found,
nullotherwise
-
insert
Insert a demand- Parameters:
demand- the demand to insert- Returns:
- the inserted demand
-
store
Stores a demand- Parameters:
demand- the demand to store- Returns:
- the stored demand
-
updateDemandsStatusId
void updateDemandsStatusId(int nStatusId, int nTemporaryStatusId) Update demands status id- Parameters:
nStatusId- the new status idnTemporaryStatusId- To find Demands that are linked to notifications that have the temporary status in parameter
-
delete
Deletes a demand with the specified id and type id- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type idstrCustomerId-
-
deleteByUid
void deleteByUid(int nUid) Deletes a demand with the specified uid- Parameters:
nUid- the uid
-
loadAllIds
Load the ids of the demands- Returns:
- The list of demand ids
-
loadByDemandId
Finds demands associated to the demand id- Parameters:
strDemandId-- Returns:
- the demand coresponding to given demand id.
-
loadByDemandIdAndTypeIdAndCustomerId
Demand loadByDemandIdAndTypeIdAndCustomerId(String strDemandId, String strDemandTypeId, String strCustomerId) Finds demands associated to the demand id and type id- Parameters:
strDemandId-- Returns:
- the demand coresponding to given demand id.
-
loadIdsByCustomerIdAndIdDemandType
List<Integer> loadIdsByCustomerIdAndIdDemandType(String strCustomerId, String strNotificationType, String strIdDemandType) Load demand ids ordered by date notification- Parameters:
strCustomerId-strNotificationType-strIdDemandType- (Optional can be null)- Returns:
- The list of demand ids
-
loadIdsByCustomerIdAndIdDemandType
List<Integer> loadIdsByCustomerIdAndIdDemandType(String strCustomerId, String strNotificationType, String strIdDemandType, String strDirectionDateOrderBy) Load demand ids ordered by date notification- Parameters:
strCustomerId-strNotificationType-strIdDemandType- (Optional can be null)strDirectionDateOrderBy- (Optional can be null)- Returns:
- The list of demand ids
-
loadIdsByStatus
List<Integer> loadIdsByStatus(String strCustomerId, List<String> listStatus, String strNotificationType, String strIdDemandType) Load demand ids by status- Parameters:
strCustomerId-listStatus-strNotificationType-strIdDemandType- (Optional can be null)- Returns:
- The list of demand ids
-
reassignDemands
Reassign demands- Parameters:
strOldCustomerId-strNewCustomerId-
-