All Known Implementing Classes:
QuizQuestionDAO

public interface IQuizQuestionDAO
Defines the interface for a QuizQuestion DAO. Any class implementing IQuizQuestionDAO must provide implementations for creating and retrieving quiz questions.
Author:
Joshua M.
  • Method Details

    • createQuizQuestion

      void createQuizQuestion(QuizQuestion quizQuestion) throws SQLException
      Creates a new QuizQuestion in the database.
      Parameters:
      quizQuestion - The QuizQuestion to create.
      Throws:
      SQLException - If an SQL error occurs during the operation.
    • getQuizQuestion

      QuizQuestion getQuizQuestion(int messageId, int number) throws SQLException
      Retrieves a specific QuizQuestion from the database.
      Parameters:
      messageId - The ID of the message (quiz) associated with the question.
      number - The question number within the quiz.
      Returns:
      The QuizQuestion matching the criteria, or null if not found.
      Throws:
      SQLException - If an SQL error occurs during the operation.
    • getAllQuizQuestions

      List<QuizQuestion> getAllQuizQuestions(int messageId) throws SQLException
      Retrieves all QuizQuestions associated with a specific quiz (message).
      Parameters:
      messageId - The ID of the message (quiz) whose questions are to be retrieved.
      Returns:
      A list of QuizQuestion objects for the specified quiz.
      Throws:
      SQLException - If an SQL error occurs during the operation.