Class FormQuestionResponseDAO

java.lang.Object
fr.paris.lutece.plugins.forms.business.FormQuestionResponseDAO
All Implemented Interfaces:
IFormQuestionResponseDAO

@ApplicationScoped public final class FormQuestionResponseDAO extends Object implements IFormQuestionResponseDAO
This class provides Data Access methods for Form objects
  • Constructor Details

    • FormQuestionResponseDAO

      public FormQuestionResponseDAO()
  • Method Details

    • 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
    • selectFormQuestionResponseByEntryResponse

      public FormQuestionResponse selectFormQuestionResponseByEntryResponse(fr.paris.lutece.plugins.genericattributes.business.Response response, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: IFormQuestionResponseDAO
      Retrieves the form question responses associated to the given Entry Response.
      Specified by:
      selectFormQuestionResponseByEntryResponse in interface IFormQuestionResponseDAO
      Returns:
    • 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
    • selectFormQuestionResponseListByListFormResponseStep

      public List<FormQuestionResponse> selectFormQuestionResponseListByListFormResponseStep(List<FormResponseStep> listFormResponseStep, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: IFormQuestionResponseDAO
      Load the data of all the FormQuestionResponse objects and returns them as a list
      Specified by:
      selectFormQuestionResponseListByListFormResponseStep in interface IFormQuestionResponseDAO
      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
    • completeListWithEntryResponses

      public void completeListWithEntryResponses(List<FormQuestionResponse> formQuestionResponsesList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: IFormQuestionResponseDAO
      Populates the FormQuestionResponse of the list with their Response values.
      Specified by:
      completeListWithEntryResponses in interface IFormQuestionResponseDAO
    • 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