fr.paris.lutece.plugins.quiz.business
Class QuizQuestionDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.quiz.business.QuizQuestionDAO

public final class QuizQuestionDAO
extends Object

This class provides Data Access methods for QuizQuestion objects


Constructor Summary
QuizQuestionDAO()
           
 
Method Summary
 void delete(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteQuestionsByGroup(int nIdQuiz, int nIdGroup, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete questions of a group
 void deleteQuestionsByQuiz(int nIdQuiz, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 Collection getVerifyQuestionsByGroup(int nIdQuiz, int nIdGroup, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Gets a list of Questions Ids
 void insert(QuizQuestion quizQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 QuizQuestion load(int nIdQuizQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of QuizQuestion from the table
 QuizQuestion loadLastQuestion(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          load the data of QuizQuestion just created
 Collection<QuizQuestion> selectQuestionsByGroup(int nIdQuiz, int nIdGroup, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns a list of questions
 Collection<QuizQuestion> selectQuestionsList(int nIdQuiz, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns the list of the questions of a quiz
 Collection<QuizQuestion> selectQuestionsListWithAnswer(int nIdQuiz, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Gets questions with answers
 void store(QuizQuestion quizQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuizQuestionDAO

public QuizQuestionDAO()
Method Detail

insert

public void insert(QuizQuestion quizQuestion,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Parameters:
quizQuestion - The Instance of the object QuizQuestion
plugin - the plugin

delete

public void delete(int nIdQuestion,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Parameters:
nIdQuestion - The indentifier of the object QuizQuestion
plugin - the plugin

deleteQuestionsByQuiz

public void deleteQuestionsByQuiz(int nIdQuiz,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a record from the table

Parameters:
nIdQuiz - The indentifier of the object QuizQuestion
plugin - the plugin

load

public QuizQuestion load(int nIdQuizQuestion,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
load the data of QuizQuestion from the table

Parameters:
nIdQuizQuestion - The indentifier of the object QuizQuestion
plugin - the plugin
Returns:
The Instance of the object QuizQuestion

loadLastQuestion

public QuizQuestion loadLastQuestion(fr.paris.lutece.portal.service.plugin.Plugin plugin)
load the data of QuizQuestion just created

Parameters:
plugin - the plugin
Returns:
The Instance of the object QuizQuestion

store

public void store(QuizQuestion quizQuestion,
                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
quizQuestion - The instance of the QuizQuestion to update
plugin - the plugin

selectQuestionsList

public Collection<QuizQuestion> selectQuestionsList(int nIdQuiz,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns the list of the questions of a quiz

Parameters:
nIdQuiz - The Quiz identifier
plugin - the plugin
Returns:
list The Collection of Questions

getVerifyQuestionsByGroup

public Collection getVerifyQuestionsByGroup(int nIdQuiz,
                                            int nIdGroup,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Gets a list of Questions Ids

Parameters:
nIdQuiz - Quiz Id
nIdGroup - Group Id
plugin - The plugin
Returns:
A list of questions ids

selectQuestionsByGroup

public Collection<QuizQuestion> selectQuestionsByGroup(int nIdQuiz,
                                                       int nIdGroup,
                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a list of questions

Parameters:
nIdQuiz - The quiz id
nIdGroup - The group id
plugin - The plugin
Returns:
The list of questions

deleteQuestionsByGroup

public void deleteQuestionsByGroup(int nIdQuiz,
                                   int nIdGroup,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete questions of a group

Parameters:
nIdQuiz - The quiz id
nIdGroup - The group Id
plugin - The plugin

selectQuestionsListWithAnswer

public Collection<QuizQuestion> selectQuestionsListWithAnswer(int nIdQuiz,
                                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Gets questions with answers

Parameters:
nIdQuiz - The quiz id
plugin - The plugin
Returns:
A list of questions with answers


Copyright © 2013 Mairie de Paris. All Rights Reserved.