java.lang.Object
fr.paris.lutece.plugins.forms.business.FormDAO
All Implemented Interfaces:
IFormDAO

@ApplicationScoped public final class FormDAO extends Object implements IFormDAO
This class provides Data Access methods for Form objects
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    countNumberOfResponseFormByUser(int nIdForm, String strGuid)
    count the number of response by the name of user
    int
    count the number of response for a form
    void
    delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Delete a record from the table
    void
    insert(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Insert a new record in the table.
    load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data from the table
    selectFormByPrimaryKeyList(List<Integer> listIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all form Objects for a given list of form identifiers
    selectFormsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the form objects and returns them as a list
    selectFormsListSorted(fr.paris.lutece.portal.service.plugin.Plugin plugin, FormItemSortConfig sortConfig)
    Load the data of all the form objects and returns them as a sorted list
    fr.paris.lutece.util.ReferenceList
    selectFormsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Load the data of all the form objects and returns them as a referenceList
    void
    store(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Update the record in the table

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FormDAO

      public FormDAO()
  • Method Details

    • insert

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

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

      public void delete(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete a record from the table
      Specified by:
      delete in interface IFormDAO
      Parameters:
      nKey - The identifier of the Form to delete
      plugin - the Plugin
    • store

      public void store(Form form, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update the record in the table
      Specified by:
      store in interface IFormDAO
      Parameters:
      form - the reference of the Form
      plugin - the Plugin
    • selectFormsList

      public List<Form> selectFormsList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the form objects and returns them as a list
      Specified by:
      selectFormsList in interface IFormDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The list which contains the data of all the form objects
    • selectFormsListSorted

      public List<Form> selectFormsListSorted(fr.paris.lutece.portal.service.plugin.Plugin plugin, FormItemSortConfig sortConfig)
      Load the data of all the form objects and returns them as a sorted list
      Specified by:
      selectFormsListSorted in interface IFormDAO
      Parameters:
      plugin - the Plugin
      sortConfig - the sort configuration (column to sort, order type)
      Returns:
      The list which contains the data of all the form objects
    • selectFormsReferenceList

      public fr.paris.lutece.util.ReferenceList selectFormsReferenceList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the data of all the form objects and returns them as a referenceList
      Specified by:
      selectFormsReferenceList in interface IFormDAO
      Parameters:
      plugin - the Plugin
      Returns:
      The referenceList which contains the data of all the form objects
    • countNumberOfResponseForms

      public int countNumberOfResponseForms(int nIdForm)
      count the number of response for a form
      Specified by:
      countNumberOfResponseForms in interface IFormDAO
      Parameters:
      nIdForm - id of form
      Returns:
      the number of the responses for a form
    • countNumberOfResponseFormByUser

      public int countNumberOfResponseFormByUser(int nIdForm, String strGuid)
      count the number of response by the name of user
      Specified by:
      countNumberOfResponseFormByUser in interface IFormDAO
      Parameters:
      nIdForm - id of form
      strGuid - the name of user
      Returns:
      return the number of response of form of user
    • selectFormByPrimaryKeyList

      public List<Form> selectFormByPrimaryKeyList(List<Integer> listIdForm, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Description copied from interface: IFormDAO
      Load the data of all form Objects for a given list of form identifiers
      Specified by:
      selectFormByPrimaryKeyList in interface IFormDAO
      Parameters:
      listIdForm - the list of form identifiers
      plugin - the Plugin
      Returns:
      The list which contains the data of all the Form objects