fr.paris.lutece.plugins.quiz.business
Interface IAnswerDAO

All Known Implementing Classes:
AnswerDAO

public interface IAnswerDAO

IAnswerDAO Interface


Method Summary
 void delete(int nIdAnswer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a record from the table
 void deleteAnswersByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete answer for a question
 void deleteAnswersByQuiz(java.util.Collection<QuizQuestion> questionList, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete answer for a quiz
 void insert(int nIdQuestion, Answer answer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 Answer load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data from the table
 java.util.List<Answer> selectAnswersList(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of all the answer objects and returns them as a List
 void store(Answer answer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the record in the table
 

Method Detail

insert

void insert(int nIdQuestion,
            Answer answer,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.

Parameters:
nIdQuestion - The question Id
answer - instance of the Answer object to inssert
plugin - the Plugin

store

void store(Answer answer,
           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record in the table

Parameters:
answer - the reference of the Answer
plugin - the Plugin

delete

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

Parameters:
nIdAnswer - int identifier of the Answer to delete
plugin - the Plugin

load

Answer load(int nKey,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data from the table

Parameters:
nKey - The identifier of the answer
plugin - the Plugin
Returns:
The instance of the answer

selectAnswersList

java.util.List<Answer> selectAnswersList(int nIdQuestion,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of all the answer objects and returns them as a List

Parameters:
plugin - the Plugin
nIdQuestion - the id of the question
Returns:
The List which contains the data of all the answer objects

deleteAnswersByQuiz

void deleteAnswersByQuiz(java.util.Collection<QuizQuestion> questionList,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete answer for a quiz

Parameters:
questionList - The question list
plugin - The plugin

deleteAnswersByQuestion

void deleteAnswersByQuestion(int nIdQuestion,
                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete answer for a question

Parameters:
nIdQuestion - The question ID
plugin - The plugin


Copyright © 2011 Mairie de Paris. All Rights Reserved.