Class DemandHome


  • public final class DemandHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for Project objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void deleteByUid​(int nUid)
      Delete a demand by uid
      static fr.paris.lutece.plugins.grubusiness.business.demand.Demand findByPrimaryKey​(int nKey)
      Finds a demand with the specified id and type id
      static java.util.List<fr.paris.lutece.plugins.grubusiness.business.demand.Demand> getByIds​(java.util.List<java.lang.Integer> listIds)
      Finds all the demands
      static fr.paris.lutece.plugins.grubusiness.business.demand.Demand getDemandByDemandIdAndTypeIdAndCustomerId​(java.lang.String strDemandId, java.lang.String strDemandTypeId, java.lang.String strCustomerId)
      Finds the demands associated to the specified demand id and demand type id
      static java.util.Collection<fr.paris.lutece.plugins.grubusiness.business.demand.Demand> getDemandIdCustomer​(java.lang.String strCustomerId)
      Finds the demands associated to the specified customer id
      static java.util.List<java.lang.Integer> getIdsByCustomerIdAndDemandTypeId​(java.lang.String strCustomerId, java.lang.String strNotificationType, java.lang.String strIdDemandType, java.lang.String strDirectionDateOrderBy)
      Load demand ids ordered by date notification
      static java.util.List<java.lang.Integer> getIdsByStatus​(java.lang.String strCustomerId, java.util.List<java.lang.String> listStatus, java.lang.String strNotificationType, java.lang.String strIdDemandType)
      Load demand ids by status
      static void reassignDemands​(java.lang.String strOldCustomerId, java.lang.String strNewCustomerId)
      reassign demands
      static java.util.Collection<fr.paris.lutece.plugins.grubusiness.business.demand.Demand> searchByFilter​(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)
      search demands by filter
      static java.util.List<java.lang.Integer> searchIdsByFilter​(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)
      search demands by filter
      static fr.paris.lutece.plugins.grubusiness.business.demand.Demand update​(fr.paris.lutece.plugins.grubusiness.business.demand.Demand demand)
      Updates a demand
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getByIds

        public static java.util.List<fr.paris.lutece.plugins.grubusiness.business.demand.Demand> getByIds​(java.util.List<java.lang.Integer> listIds)
        Finds all the demands
        Returns:
        all the demands. An empty collection is returned if no demands has been found.
      • searchIdsByFilter

        public static java.util.List<java.lang.Integer> searchIdsByFilter​(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)
        search demands by filter
        Parameters:
        strKey -
        Returns:
      • searchByFilter

        public static java.util.Collection<fr.paris.lutece.plugins.grubusiness.business.demand.Demand> searchByFilter​(fr.paris.lutece.plugins.grubusiness.business.notification.NotificationFilter filter)
        search demands by filter
        Parameters:
        strKey -
        Returns:
      • findByPrimaryKey

        public static fr.paris.lutece.plugins.grubusiness.business.demand.Demand findByPrimaryKey​(int nKey)
        Finds a demand with the specified id and type id
        Parameters:
        nKey - The project primary key
        Returns:
        an instance of Project
      • getDemandIdCustomer

        public static java.util.Collection<fr.paris.lutece.plugins.grubusiness.business.demand.Demand> getDemandIdCustomer​(java.lang.String strCustomerId)
        Finds the demands associated to the specified customer id
        Returns:
        the list which contains the id of all the project objects
      • getDemandByDemandIdAndTypeIdAndCustomerId

        public static fr.paris.lutece.plugins.grubusiness.business.demand.Demand getDemandByDemandIdAndTypeIdAndCustomerId​(java.lang.String strDemandId,
                                                                                                                           java.lang.String strDemandTypeId,
                                                                                                                           java.lang.String strCustomerId)
        Finds the demands associated to the specified demand id and demand type id
        Parameters:
        strDemandId -
        strDemandTypeId -
        Returns:
        the list which contains the id of all the project objects
      • getIdsByCustomerIdAndDemandTypeId

        public static java.util.List<java.lang.Integer> getIdsByCustomerIdAndDemandTypeId​(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)
        Returns:
        The list of demand ids
      • getIdsByStatus

        public static java.util.List<java.lang.Integer> getIdsByStatus​(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 -
        Returns:
        The list of demand ids
      • update

        public static fr.paris.lutece.plugins.grubusiness.business.demand.Demand update​(fr.paris.lutece.plugins.grubusiness.business.demand.Demand demand)
        Updates a demand
        Parameters:
        demand - the demand to update
        Returns:
        the updated demand
      • reassignDemands

        public static void reassignDemands​(java.lang.String strOldCustomerId,
                                           java.lang.String strNewCustomerId)
        reassign demands
        Parameters:
        strOldCustomerId -
        strNewCustomerId -
      • deleteByUid

        public static void deleteByUid​(int nUid)
        Delete a demand by uid
        Parameters:
        nUid -