Interface MailSQL

All Superinterfaces:
SQL

public interface MailSQL extends SQL
SQL interface for mail data operations in FlectonePulse. Defines database queries for managing player mail messages.
Since:
0.9.0
  • Method Summary

    Modifier and Type
    Method
    Description
    findByReceiver(int receiverId)
    Finds all valid mail messages for a receiver.
    findBySender(int senderId)
    Finds all valid mail messages from a sender.
    int
    insert(long date, int senderId, int receiverId, String message)
    Inserts a new mail message.
    void
    invalidate(int id)
    Invalidates a mail message.
  • Method Details

    • insert

      int insert(long date, int senderId, int receiverId, String message)
      Inserts a new mail message.
      Parameters:
      date - the timestamp when the mail was sent
      senderId - the ID of the player who sent the mail
      receiverId - the ID of the player who received the mail
      message - the mail message content
      Returns:
      the generated mail ID
    • invalidate

      void invalidate(int id)
      Invalidates a mail message.
      Parameters:
      id - the mail ID
    • findByReceiver

      List<Mail> findByReceiver(int receiverId)
      Finds all valid mail messages for a receiver.
      Parameters:
      receiverId - the ID of the player who received the mail
      Returns:
      list of mail messages
    • findBySender

      List<Mail> findBySender(int senderId)
      Finds all valid mail messages from a sender.
      Parameters:
      senderId - the ID of the player who sent the mail
      Returns:
      list of mail messages