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 insert(int nIdQuestion, Answer answer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert a new record in the table.
 boolean isAnswersWithProfil(int nIdProfil, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data of the answer from the table
 Answer load(int nKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the data from the table
 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

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

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

isAnswersWithProfil

boolean isAnswersWithProfil(int nIdProfil,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of the answer from the table

Parameters:
nIdProfil - The identifier of the profil
plugin - The plugin
Returns:
true if there is at least one answer with profil, false otherwise


Copyright © 2013 Mairie de Paris. All Rights Reserved.