|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.quiz.business.AnswerHome
public final class AnswerHome
This class provides instances management methods (create, find, ...) for Answer objects
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static int getValidAnswerCount(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuestion - the question idplugin - The plugin
public 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 Plugin
public 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 Plugin
public static void remove(int nAnswerId,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nAnswerId - The answer Idplugin - the Plugin
public static Answer findByPrimaryKey(int nKey,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nKey - The answer primary keyplugin - the Plugin
public static List<Answer> getAnswersList(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuestion - the id of the questionplugin - the Plugin
public static void removeAnswersByQuestionList(Collection<QuizQuestion> questionList,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
questionList - The question listplugin - The plugin
public static void removeAnswersByQuestion(int nIdQuestion,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdQuestion - The question IDplugin - The plugin
public static boolean isAnswersWithProfil(int nIdProfil,
fr.paris.lutece.portal.service.plugin.Plugin plugin)
nIdProfil - The identifier of the profilplugin - The plugin
true if there is at least one answer with profil,
false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||