All Known Implementing Classes:
MessageDAO

public interface IMessageDAO
Defines the interface for a Message DAO. Any class implementing IMessageDAO must provide implementations for creating messages and retrieving messages associated with a chat.
Author:
Joshua M.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Creates a new Message in the database.
    getAllChatMessages(int chatId)
    Retrieves all Messages associated with a specific chat.
  • Method Details

    • createMessage

      void createMessage(Message message) throws SQLException
      Creates a new Message in the database.
      Parameters:
      message - The Message to create.
      Throws:
      SQLException - If an SQL error occurs during the operation.
    • getAllChatMessages

      List<Message> getAllChatMessages(int chatId) throws SQLException
      Retrieves all Messages associated with a specific chat.
      Parameters:
      chatId - The ID of the chat whose messages are to be retrieved.
      Returns:
      A list of Message objects associated with the chat.
      Throws:
      SQLException - If an SQL error occurs during the operation.