Interface IDemandDAO

  • All Known Implementing Classes:
    MockDemandDAO

    public interface IDemandDAO
    This interface represents a data access object for Demand object
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String strDemandId, java.lang.String strDemandTypeId, java.lang.String strCustomerId)
      Deletes a demand with the specified id and type id
      void deleteByUid​(int nUid)
      Deletes a demand with the specified uid
      Demand insert​(Demand demand)
      Insert a demand
      Demand load​(int nId)
      Finds a demand with the specified id and type id
      java.util.List<java.lang.String> loadAllIds()
      Load the ids of the demands
      java.util.Collection<Demand> loadByCustomerId​(java.lang.String strCustomerId)
      Finds the demands associated to the specified customer id
      Demand loadByDemandId​(java.lang.String strDemandId)
      Finds demands associated to the demand id
      Demand loadByDemandIdAndTypeIdAndCustomerId​(java.lang.String strDemandId, java.lang.String strDemandTypeId, java.lang.String strCustomerId)
      Finds demands associated to the demand id and type id
      java.util.Collection<Demand> loadByFilter​(NotificationFilter filter)
      Search demands by filter
      java.util.List<Demand> loadByIds​(java.util.List<java.lang.Integer> listIds)
      load demands corresponding to the id list
      java.util.Collection<Demand> loadByReference​(java.lang.String strReference)
      Finds the demands associated to the specified reference
      java.util.List<java.lang.Integer> loadIdsByCustomerIdAndIdDemandType​(java.lang.String strCustomerId, java.lang.String strNotificationType, java.lang.String strIdDemandType)
      Load demand ids ordered by date notification
      java.util.List<java.lang.Integer> loadIdsByCustomerIdAndIdDemandType​(java.lang.String strCustomerId, java.lang.String strNotificationType, java.lang.String strIdDemandType, java.lang.String strDirectionDateOrderBy)
      Load demand ids ordered by date notification
      java.util.List<java.lang.Integer> loadIdsByFilter​(NotificationFilter filter)
      Search demands by filter
      java.util.List<java.lang.Integer> loadIdsByStatus​(java.lang.String strCustomerId, java.util.List<java.lang.String> listStatus, java.lang.String strNotificationType, java.lang.String strIdDemandType)
      Load demand ids by status
      void reassignDemands​(java.lang.String strOldCustomerId, java.lang.String strNewCustomerId)
      Reassign demands
      Demand store​(Demand demand)
      Stores a demand
      void updateDemandsStatusId​(int nStatusId, int nTemporaryStatusId)
      Update demands status id
    • Method Detail

      • loadByCustomerId

        java.util.Collection<Demand> loadByCustomerId​(java.lang.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

        java.util.Collection<Demand> loadByReference​(java.lang.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

        java.util.Collection<Demand> loadByFilter​(NotificationFilter filter)
        Search demands by filter
        Parameters:
        filter -
        Returns:
        the demands list
      • loadIdsByFilter

        java.util.List<java.lang.Integer> loadIdsByFilter​(NotificationFilter filter)
        Search demands by filter
        Parameters:
        filter -
        Returns:
        the demands list
      • loadByIds

        java.util.List<Demand> loadByIds​(java.util.List<java.lang.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 id
        strDemandTypeId - the demand type id
        Returns:
        the demand if found, null otherwise
      • 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
      • updateDemandsStatusId

        void updateDemandsStatusId​(int nStatusId,
                                   int nTemporaryStatusId)
        Update demands status id
        Parameters:
        nStatusId - the new status id
        nTemporaryStatusId - To find Demands that are linked to notifications that have the temporary status in parameter
      • delete

        void delete​(java.lang.String strDemandId,
                    java.lang.String strDemandTypeId,
                    java.lang.String strCustomerId)
        Deletes a demand with the specified id and type id
        Parameters:
        strDemandId - the demand id
        strDemandTypeId - the demand type id
        strCustomerId -
      • deleteByUid

        void deleteByUid​(int nUid)
        Deletes a demand with the specified uid
        Parameters:
        nUid - the uid
      • loadAllIds

        java.util.List<java.lang.String> loadAllIds()
        Load the ids of the demands
        Returns:
        The list of demand ids
      • loadByDemandId

        Demand loadByDemandId​(java.lang.String strDemandId)
        Finds demands associated to the demand id
        Parameters:
        strDemandId -
        Returns:
        the demand coresponding to given demand id.
      • loadByDemandIdAndTypeIdAndCustomerId

        Demand loadByDemandIdAndTypeIdAndCustomerId​(java.lang.String strDemandId,
                                                    java.lang.String strDemandTypeId,
                                                    java.lang.String strCustomerId)
        Finds demands associated to the demand id and type id
        Parameters:
        strDemandId -
        Returns:
        the demand coresponding to given demand id.
      • loadIdsByCustomerIdAndIdDemandType

        java.util.List<java.lang.Integer> loadIdsByCustomerIdAndIdDemandType​(java.lang.String strCustomerId,
                                                                             java.lang.String strNotificationType,
                                                                             java.lang.String strIdDemandType)
        Load demand ids ordered by date notification
        Parameters:
        strCustomerId -
        strNotificationType -
        strIdDemandType - (Optional can be null)
        Returns:
        The list of demand ids
      • loadIdsByCustomerIdAndIdDemandType

        java.util.List<java.lang.Integer> loadIdsByCustomerIdAndIdDemandType​(java.lang.String strCustomerId,
                                                                             java.lang.String strNotificationType,
                                                                             java.lang.String strIdDemandType,
                                                                             java.lang.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

        java.util.List<java.lang.Integer> loadIdsByStatus​(java.lang.String strCustomerId,
                                                          java.util.List<java.lang.String> listStatus,
                                                          java.lang.String strNotificationType,
                                                          java.lang.String strIdDemandType)
        Load demand ids by status
        Parameters:
        strCustomerId -
        listStatus -
        strNotificationType -
        strIdDemandType - (Optional can be null)
        Returns:
        The list of demand ids
      • reassignDemands

        void reassignDemands​(java.lang.String strOldCustomerId,
                             java.lang.String strNewCustomerId)
        Reassign demands
        Parameters:
        strOldCustomerId -
        strNewCustomerId -