Class DemandDAO

    • Constructor Detail

      • DemandDAO

        public DemandDAO()
    • Method Detail

      • newPrimaryKey

        public int newPrimaryKey​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Generate a new primary key
        Specified by:
        newPrimaryKey in interface IDemandDAO
        Parameters:
        plugin - the Plugin
        Returns:
        a new primary key
      • insert

        public int insert​(Demand demand,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the table.
        Specified by:
        insert in interface IDemandDAO
        Parameters:
        demand - instance
        plugin - the Plugin
        Returns:
        the newly created demand id
      • load

        public Demand load​(int nIdDemand,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        load in interface IDemandDAO
        Parameters:
        nIdDemand - The identifier of the demand
        plugin - the Plugin
        Returns:
        The instance of the object
      • loadByRemoteKey

        public Demand loadByRemoteKey​(String strRemoteId,
                                      int nIdDemandType,
                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load demand by Remote Id and id demand
        Specified by:
        loadByRemoteKey in interface IDemandDAO
        Parameters:
        strRemoteId - the remote Id
        nIdDemandType - the Id demand type
        plugin - the plugin
        Returns:
        The instance of the object
      • store

        public void store​(Demand demand,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the record in the table
        Specified by:
        store in interface IDemandDAO
        Parameters:
        demand - the reference of the object
        plugin - the Plugin
      • delete

        public void delete​(int nIdDemand,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a record from the table
        Specified by:
        delete in interface IDemandDAO
        Parameters:
        nIdDemand - int identifier of the demand to delete
        plugin - the Plugin
      • selectAll

        public List<Demand> selectAll​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Find all demands
        Specified by:
        selectAll in interface IDemandDAO
        Parameters:
        plugin - Plugin
        Returns:
        a list of Demand
      • selectByFilter

        public List<Demand> selectByFilter​(DemandFilter dFilter,
                                           IPaginationProperties paginationProperties,
                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Find by filter
        Specified by:
        selectByFilter in interface IDemandDAO
        Parameters:
        dFilter - the filter
        paginationProperties - the pagination properties (can be null)
        plugin - Plugin
        Returns:
        a list of Demand
      • countByFilter

        public int countByFilter​(DemandFilter dFilter,
                                 fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Count results by filter
        Specified by:
        countByFilter in interface IDemandDAO
        Parameters:
        dFilter - the filter
        plugin - Plugin
        Returns:
        the number of result