java.lang.Object
fr.paris.lutece.plugins.wiki.modules.quiz.business.QuizAnswerDAO
All Implemented Interfaces:
IQuizAnswerDAO

@ApplicationScoped public class QuizAnswerDAO extends Object implements IQuizAnswerDAO
Implementation of quiz answer data access object.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Deletes all answers associated with a specific question.
    void
    insert(QuizAnswer answer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Inserts a new quiz answer into the database.
    selectByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
    Retrieves all answers for a specific question.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QuizAnswerDAO

      public QuizAnswerDAO()
  • Method Details

    • insert

      public void insert(QuizAnswer answer, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Inserts a new quiz answer into the database.
      Specified by:
      insert in interface IQuizAnswerDAO
      Parameters:
      answer - The quiz answer to insert
      plugin - The plugin instance
    • deleteByQuestion

      public void deleteByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Deletes all answers associated with a specific question.
      Specified by:
      deleteByQuestion in interface IQuizAnswerDAO
      Parameters:
      nIdQuestion - The question ID
      plugin - The plugin instance
    • selectByQuestion

      public List<QuizAnswer> selectByQuestion(int nIdQuestion, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Retrieves all answers for a specific question.
      Specified by:
      selectByQuestion in interface IQuizAnswerDAO
      Parameters:
      nIdQuestion - The question ID
      plugin - The plugin instance
      Returns:
      A list of quiz answers for the question