Class MockDemandDAO

    • Constructor Detail

      • MockDemandDAO

        public MockDemandDAO()
    • Method Detail

      • loadByCustomerId

        public Collection<Demand> loadByCustomerId​(String strCustomerId)
        Finds the demands associated to the specified customer id
        Specified by:
        loadByCustomerId in interface IDemandDAO
        Parameters:
        strCustomerId - the customer id
        Returns:
        the demands. An empty collection is returned if no demands has been found.
      • loadByReference

        public Collection<Demand> loadByReference​(String strReference)
        Finds the demands associated to the specified reference
        Specified by:
        loadByReference in interface IDemandDAO
        Parameters:
        strReference - the reference
        Returns:
        the demands. An empty collection is returned if no demands has been found.
      • load

        public Demand load​(int nId)
        Finds a demand with the specified id and type id
        Specified by:
        load in interface IDemandDAO
        Returns:
        the demand if found, null otherwise
      • insert

        public Demand insert​(Demand demand)
        Insert a demand
        Specified by:
        insert in interface IDemandDAO
        Parameters:
        demand - the demand to insert
        Returns:
        the inserted demand
      • store

        public Demand store​(Demand demand)
        Stores a demand
        Specified by:
        store in interface IDemandDAO
        Parameters:
        demand - the demand to store
        Returns:
        the stored demand
      • delete

        public void delete​(String strDemandId,
                           String strDemandTypeId,
                           String strCustomerID)
        Deletes a demand with the specified id and type id
        Specified by:
        delete in interface IDemandDAO
        Parameters:
        strDemandId - the demand id
        strDemandTypeId - the demand type id
      • loadAllIds

        public List<String> loadAllIds()
        Load the ids of the demands
        Specified by:
        loadAllIds in interface IDemandDAO
        Returns:
        The list of demand ids
      • loadByDemandId

        public Demand loadByDemandId​(String strId)
        Finds demands associated to the demand id
        Specified by:
        loadByDemandId in interface IDemandDAO
        Returns:
        the demand coresponding to given demand id.
      • deleteByUid

        public void deleteByUid​(int nUid)
        Description copied from interface: IDemandDAO
        Deletes a demand with the specified uid
        Specified by:
        deleteByUid in interface IDemandDAO
        Parameters:
        nUid - the uid