Interface IDemandDAO
-
- All Known Implementing Classes:
MockDemandDAO
public interface IDemandDAOThis interface represents a data access object for Demand object
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddelete(String strDemandId, String strDemandTypeId)Deletes a demand with the specified id and type idDemandinsert(Demand demand)Insert a demandDemandload(int nId)Finds a demand with the specified id and type idList<String>loadAllIds()Load the ids of the demandsCollection<Demand>loadByCustomerId(String strCustomerId)Finds the demands associated to the specified customer idDemandloadByDemandId(String strDemandId)Finds demands associated to the demand idDemandloadByDemandIdAndTypeId(String strDemandId, String strDemandTypeId)Finds demands associated to the demand id and type idCollection<Demand>loadByFilter(NotificationFilter filter)Search demands by filterList<Demand>loadByIds(List<Integer> listIds)load demands corresponding to the id listCollection<Demand>loadByReference(String strReference)Finds the demands associated to the specified referenceList<Integer>loadIdsByCustomerIdAndIdDemandType(String strCustomerId, String strNotificationType, String strIdDemandType)Load demand ids ordered by date notificationList<Integer>loadIdsByFilter(NotificationFilter filter)Search demands by filterList<Integer>loadIdsByStatus(String strCustomerId, List<String> listStatus, String strNotificationType, String strIdDemandType)Load demand ids by statusDemandstore(Demand demand)Stores a demand
-
-
-
Method Detail
-
loadByCustomerId
Collection<Demand> loadByCustomerId(String strCustomerId)
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
Collection<Demand> loadByReference(String strReference)
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
Collection<Demand> loadByFilter(NotificationFilter filter)
Search demands by filter- Parameters:
filter-- Returns:
- the demands list
-
loadIdsByFilter
List<Integer> loadIdsByFilter(NotificationFilter filter)
Search demands by filter- Parameters:
filter-- Returns:
- the demands list
-
loadByIds
List<Demand> loadByIds(List<Integer> listIds)
load demands corresponding to the id list- Parameters:
listIds-- Returns:
- the demands
-
load
Demand load(int nId)
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
Demand insert(Demand demand)
Insert a demand- Parameters:
demand- the demand to insert- Returns:
- the inserted demand
-
store
Demand store(Demand demand)
Stores a demand- Parameters:
demand- the demand to store- Returns:
- the stored demand
-
delete
void delete(String strDemandId, String strDemandTypeId)
Deletes a demand with the specified id and type id- Parameters:
strDemandId- the demand idstrDemandTypeId- the demand type id
-
loadByDemandId
Demand loadByDemandId(String strDemandId)
Finds demands associated to the demand id- Parameters:
strDemandId-- Returns:
- the demand coresponding to given demand id.
-
loadByDemandIdAndTypeId
Demand loadByDemandIdAndTypeId(String strDemandId, String strDemandTypeId)
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
-
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
-
-