Class QuestionHome
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.business.QuestionHome
-
public final class QuestionHome extends 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 Questioncreate(Question question)Create an instance of the question classstatic List<Question>findByCode(String strCode)Returns all questions with the given technical code.static QuestionfindByCodeAndEntry(String strCode, int entryId)Returns all questions with the given technical code and entry.static QuestionfindByPrimaryKey(int nKey)Returns an instance of a question whose identifier is specified in parameterstatic List<Question>findByPrimaryKeyList(List<Integer> keyList)Returns an instance of a question whose identifier is specified in parameterstatic List<Integer>getIdQuestionsList()Load the id of all the question objects and returns them as a liststatic List<Question>getListQuestionByIdForm(int nIdForm)Load the data of all the question objects for given form id and returns them as a liststatic List<Question>getListQuestionByIdFormUncomplete(int nIdForm)Load the data of all the question objects for given form id and returns them as a liststatic List<Question>getQuestionsList()Load the data of all the question objects and returns them as a liststatic List<Question>getQuestionsListByStep(int nIdStep)Load the data of all the question objects and returns them as a liststatic List<Question>getQuestionsListUncomplete()Load the data of all the question objects and returns them as a liststatic fr.paris.lutece.util.ReferenceListgetQuestionsReferenceList()Load the data of all the question objects and returns them as a referenceListstatic fr.paris.lutece.util.ReferenceListgetQuestionsReferenceListByForm(int nIdForm)Load the data of all the question objects for the given form and returns them as a referenceListstatic voidremove(int nKey)Remove the question whose identifier is specified in parameter.static Questionupdate(Question question)Update of the question which is specified in parameter
-
-
-
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 List<Question> findByCode(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(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 List<Question> findByPrimaryKeyList(List<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 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 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 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 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 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 List<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
-
-