Class QuestionHome


  • public final class QuestionHome
    extends java.lang.Object
    This class provides instances management methods (create, find, ...) for Question objects
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Question create​(Question question)
      Create an instance of the question class
      static java.util.List<Question> findByCode​(java.lang.String strCode)
      Returns all questions with the given technical code.
      static Question findByCodeAndEntry​(java.lang.String strCode, int entryId)
      Returns all questions with the given technical code and entry.
      static Question findByPrimaryKey​(int nKey)
      Returns an instance of a question whose identifier is specified in parameter
      static java.util.List<Question> findByPrimaryKeyList​(java.util.List<java.lang.Integer> keyList)
      Returns an instance of a question whose identifier is specified in parameter
      static java.util.List<java.lang.Integer> getIdQuestionsList()
      Load the id of all the question objects and returns them as a list
      static java.util.List<Question> getListQuestionByIdForm​(int nIdForm)
      Load the data of all the question objects for given form id and returns them as a list
      static java.util.List<Question> getListQuestionByIdFormUncomplete​(int nIdForm)
      Load the data of all the question objects for given form id and returns them as a list
      static java.util.List<Question> getQuestionListByIdFormInQuestionOrder​(int nIdForm)
      Load the data of question object for the given form and returns them in display order
      static java.util.List<Question> getQuestionsList()
      Load the data of all the question objects and returns them as a list
      static java.util.List<Question> getQuestionsListByStep​(int nIdStep)
      Load the data of all the question objects and returns them as a list
      static java.util.List<Question> getQuestionsListUncomplete()
      Load the data of all the question objects and returns them as a list
      static fr.paris.lutece.util.ReferenceList getQuestionsReferenceList()
      Load the data of all the question objects and returns them as a referenceList
      static fr.paris.lutece.util.ReferenceList getQuestionsReferenceListByForm​(int nIdForm)
      Load the data of all the question objects for the given form and returns them as a referenceList
      static void remove​(int nKey)
      Remove the question whose identifier is specified in parameter.
      static Question update​(Question question)
      Update of the question which is specified in parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

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

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

        public static void remove​(int nKey)
        Remove the question whose identifier is specified in parameter. The associated Entry and EntryResponses will be also deleted
        Parameters:
        nKey - The question Id
      • findByPrimaryKey

        public static Question findByPrimaryKey​(int nKey)
        Returns an instance of a question whose identifier is specified in parameter
        Parameters:
        nKey - The question primary key
        Returns:
        an instance of Question
      • findByCode

        public static java.util.List<Question> findByCode​(java.lang.String strCode)
        Returns all questions with the given technical code.
        Parameters:
        strCode - The question code
        Returns:
        an instance of Question
      • findByCodeAndEntry

        public static Question findByCodeAndEntry​(java.lang.String strCode,
                                                  int entryId)
        Returns all questions with the given technical code and entry.
        Parameters:
        strCode - The question code
        Returns:
        an instance of Question
      • findByPrimaryKeyList

        public static java.util.List<Question> findByPrimaryKeyList​(java.util.List<java.lang.Integer> keyList)
        Returns an instance of a question whose identifier is specified in parameter
        Parameters:
        keyList - The questions primary keys
        Returns:
        a list of Questions
      • getQuestionsList

        public static java.util.List<Question> getQuestionsList()
        Load the data of all the question objects and returns them as a list
        Returns:
        the list which contains the data of all the question objects
      • getQuestionsListUncomplete

        public static java.util.List<Question> getQuestionsListUncomplete()
        Load the data of all the question objects and returns them as a list
        Returns:
        the list which contains the data of all the question objects
      • getQuestionsListByStep

        public static java.util.List<Question> getQuestionsListByStep​(int nIdStep)
        Load the data of all the question objects and returns them as a list
        Parameters:
        nIdStep - The step primary key
        Returns:
        the list which contains the data of all the question objects
      • getListQuestionByIdForm

        public static java.util.List<Question> getListQuestionByIdForm​(int nIdForm)
        Load the data of all the question objects for given form id and returns them as a list
        Parameters:
        nIdForm - The id of the form
        Returns:
        the list of all the question objects for the given form id
      • getListQuestionByIdFormUncomplete

        public static java.util.List<Question> getListQuestionByIdFormUncomplete​(int nIdForm)
        Load the data of all the question objects for given form id and returns them as a list
        Parameters:
        nIdForm - The id of the form
        Returns:
        the list of all the question objects for the given form id
      • getIdQuestionsList

        public static java.util.List<java.lang.Integer> getIdQuestionsList()
        Load the id of all the question objects and returns them as a list
        Returns:
        the list which contains the id of all the question objects
      • getQuestionsReferenceList

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

        public static fr.paris.lutece.util.ReferenceList getQuestionsReferenceListByForm​(int nIdForm)
        Load the data of all the question objects for the given form and returns them as a referenceList
        Parameters:
        nIdForm - The form primary key
        Returns:
        the referenceList which contains the data of all the question objects
      • getQuestionListByIdFormInQuestionOrder

        public static java.util.List<Question> getQuestionListByIdFormInQuestionOrder​(int nIdForm)
        Load the data of question object for the given form and returns them in display order
        Parameters:
        nIdForm - The form primary key
        Returns:
        the question list sorted in display order