Class FormHome

java.lang.Object
fr.paris.lutece.plugins.forms.business.FormHome

public final class FormHome extends Object
This class provides instances management methods (create, find, ...) for Form objects
  • Method Details

    • create

      public static Form create(Form form)
      Create an instance of the form class
      Parameters:
      form - The instance of the Form which contains the informations to store
      Returns:
      The instance of form which has been created with its primary key.
    • update

      public static Form update(Form form)
      Update of the form which is specified in parameter
      Parameters:
      form - The instance of the Form which contains the data to store
      Returns:
      The instance of the form which has been updated
    • remove

      public static void remove(int nKey)
      Remove the form whose identifier is specified in parameter
      Parameters:
      nKey - The form Id
    • findByPrimaryKey

      public static Form findByPrimaryKey(int nKey)
      Returns an instance of a form whose identifier is specified in parameter
      Parameters:
      nKey - The form primary key
      Returns:
      an instance of Form
    • getFormList

      public static List<Form> getFormList()
      Load the data of all the form objects and returns them as a list
      Returns:
      the list which contains the data of all the form objects
    • getFormListSorted

      public static List<Form> getFormListSorted(FormItemSortConfig sortConfig)
      Load the data of all the form objects and returns them as a list
      Returns:
      the list which contains the data of all the form objects
    • getFormsReferenceList

      public static fr.paris.lutece.util.ReferenceList getFormsReferenceList()
      Load the data of all the form objects and returns them as a referenceList
      Returns:
      the referenceList which contains the data of all the form objects
    • getNumberOfResponseForms

      public static int getNumberOfResponseForms(int nIdFormm)
      count the number of response for a form
      Parameters:
      nIdFormm -
      Returns:
      the number of response for a form
    • getNumberOfResponseFormByUser

      public static int getNumberOfResponseFormByUser(int nIdForm, String strGuid)
      count the number of response for form
      Parameters:
      nIdForm - id of form
      strGuid - the name of user
      Returns:
      the number of response for form corresponding of user
    • getFormByPrimaryKeyList

      public static List<Form> getFormByPrimaryKeyList(List<Integer> listIdForm)
      Load the data of all form Objects for a given list of form identifiers
      Parameters:
      listIdForm - The list of form identifiers
      Returns:
      the form objects