Class FormQuestionResponseDAO

    • Constructor Detail

      • FormQuestionResponseDAO

        public FormQuestionResponseDAO()
    • Method Detail

      • insert

        public void insert​(FormQuestionResponse formQuestionResponse,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert a new record in the table.
        Specified by:
        insert in interface IFormQuestionResponseDAO
        Parameters:
        formQuestionResponse - instance of the formQuestionResponse object to insert
        plugin - the Plugin
      • load

        public FormQuestionResponse load​(int nKey,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data from the table
        Specified by:
        load in interface IFormQuestionResponseDAO
        Parameters:
        nKey - The identifier of the FormQuestionResponse
        plugin - the Plugin
        Returns:
        The instance of the FormQuestionResponse
      • delete

        public void delete​(FormQuestionResponse formQuestionResponse,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete a record from the table
        Specified by:
        delete in interface IFormQuestionResponseDAO
        Parameters:
        formQuestionResponse - The formQuestionResponse to delete
        plugin - the Plugin
      • selectFormQuestionResponseByQuestion

        public List<FormQuestionResponse> selectFormQuestionResponseByQuestion​(int nIdQuestion,
                                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Retrieves the form question responses associated to the specified question.
        Specified by:
        selectFormQuestionResponseByQuestion in interface IFormQuestionResponseDAO
        Parameters:
        nIdQuestion - The identifier of the Question
        plugin - The Plugin to use to execute the query
        Returns:
        the list of form question responses
      • store

        public void store​(FormQuestionResponse formQuestionResponse,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Update the record in the table
        Specified by:
        store in interface IFormQuestionResponseDAO
        Parameters:
        formQuestionResponse - the reference of the FormQuestionResponse
        plugin - the Plugin
      • selectFormQuestionResponseList

        public List<FormQuestionResponse> selectFormQuestionResponseList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the FormQuestionResponse objects and returns them as a list
        Specified by:
        selectFormQuestionResponseList in interface IFormQuestionResponseDAO
        Parameters:
        plugin - the Plugin
        Returns:
        The list which contains the data of all the FormQuestionResponse objects
      • selectFormQuestionResponseListByStepAndFormResponse

        public List<FormQuestionResponse> selectFormQuestionResponseListByStepAndFormResponse​(int nIdFormResponse,
                                                                                              int nIdStep,
                                                                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the FormQuestionResponse objects and returns them as a list
        Specified by:
        selectFormQuestionResponseListByStepAndFormResponse in interface IFormQuestionResponseDAO
        Parameters:
        nIdFormResponse - The identifier of the FormResponse
        nIdStep - The identifier of the Step
        plugin - the Plugin
        Returns:
        The list which contains the data of all the FormQuestionResponse objects
      • selectFormQuestionResponseListByFormResponse

        public List<FormQuestionResponse> selectFormQuestionResponseListByFormResponse​(int nIdFormResponse,
                                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the FormQuestionResponse objects for saving and returns them as a list
        Specified by:
        selectFormQuestionResponseListByFormResponse in interface IFormQuestionResponseDAO
        Parameters:
        nIdFormResponse - The identifier of the FormResponse
        plugin - the Plugin
        Returns:
        The list which contains the data of all the FormQuestionResponse objects
      • selectFormQuestionResponseByResponseForQuestion

        public List<FormQuestionResponse> selectFormQuestionResponseByResponseForQuestion​(int nIdFormResponse,
                                                                                          int nIdQuestion,
                                                                                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Retrieves the form question responses associated to the given form response for the specified question.
        Specified by:
        selectFormQuestionResponseByResponseForQuestion in interface IFormQuestionResponseDAO
        Parameters:
        nIdFormResponse - The identifier of the FormResponse
        nIdQuestion - The identifier of the Question
        plugin - The Plugin to use to execute the query
        Returns:
        the found form question responses
      • selectFormQuestionResponseListByFormResponseIdList

        public List<FormQuestionResponse> selectFormQuestionResponseListByFormResponseIdList​(List<Integer> listIdFormResponse,
                                                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the data of all the FormQuestionResponse objects and returns them as a list
        Specified by:
        selectFormQuestionResponseListByFormResponseIdList in interface IFormQuestionResponseDAO
        Parameters:
        listIdFormResponse - The identifier of the FormResponse
        plugin - the Plugin
        Returns:
        The list which contains the data of all the FormQuestionResponse objects
      • findMaxIterationNumberByQuestion

        public int findMaxIterationNumberByQuestion​(int nIdQuestion,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Find the maximum iteration number for a given question
        Specified by:
        findMaxIterationNumberByQuestion in interface IFormQuestionResponseDAO
        Parameters:
        nIdQuestion - The identifier of the Question
        plugin - The Plugin to use to execute the query
        Returns:
        the maximum iteration number