public final class AnswerHome extends Object
| Modifier and Type | Method and Description |
|---|---|
static Answer |
create(int nIdQuestion,
Answer answer,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create an instance of the answer class
|
static Answer |
findByPrimaryKey(int nKey,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a answer whose identifier is specified in
parameter
|
static List<Answer> |
getAnswersList(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the answer objects and returns them in form of a
list
|
static int |
getValidAnswerCount(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Return valid answer count for a given question
|
static boolean |
isAnswersWithProfil(int nIdProfil,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Search asnwers with profil
|
static void |
remove(int nAnswerId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the answer whose identifier is specified in parameter
|
static void |
removeAnswersByQuestion(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove answer for a given question
|
static void |
removeAnswersByQuestionList(Collection<QuizQuestion> questionList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove answers for a Quiz
|
static Answer |
update(Answer answer,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the answer which is specified in parameter
|
public static int getValidAnswerCount(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuestion - the question idplugin - The pluginpublic static Answer create(int nIdQuestion, Answer answer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuestion - The question Idanswer - The instance of the Answer which contains the informations
to storeplugin - the Pluginpublic static Answer update(Answer answer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
answer - The instance of the Answer which contains the data to storeplugin - the Pluginpublic static void remove(int nAnswerId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nAnswerId - The answer Idplugin - the Pluginpublic static Answer findByPrimaryKey(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
nKey - The answer primary keyplugin - the Pluginpublic static List<Answer> getAnswersList(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuestion - the id of the questionplugin - the Pluginpublic static void removeAnswersByQuestionList(Collection<QuizQuestion> questionList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
questionList - The question listplugin - The pluginpublic static void removeAnswersByQuestion(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuestion - The question IDplugin - The pluginpublic static boolean isAnswersWithProfil(int nIdProfil,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdProfil - The identifier of the profilplugin - The plugintrue if there is at least one answer with profil,
false otherwiseCopyright © 2019 City of Paris. All rights reserved.