Class PostmanDAO

java.lang.Object
games.stendhal.server.core.engine.db.PostmanDAO

public class PostmanDAO extends Object
Database access for postman messages.
Author:
kymara
  • Constructor Details

    • PostmanDAO

      public PostmanDAO()
  • Method Details

    • storeMessage

      public void storeMessage(DBTransaction transaction, String source, String target, String message, String messagetype, Timestamp timestamp) throws SQLException
      store a message from any named source We do not specify it must be a player because NPCs use postman to send messages
      Parameters:
      transaction - DBTransaction
      source - name of source
      target - name of player that the message is for
      message - message to be sent
      messagetype - N for NPCs, S for support, P for player
      timestamp - timestamp
      Throws:
      SQLException - in case of an database error
    • getChatMessages

      public List<ChatMessage> getChatMessages(DBTransaction transaction, String charname) throws SQLException
      gets a list of ChatMessages for this character
      Parameters:
      transaction - DBTransaction
      charname - charname - name of character
      Returns:
      list of ChatMessages
      Throws:
      SQLException - in case of an database error
    • markMessagesDelivered

      public void markMessagesDelivered(DBTransaction transaction, String charname) throws SQLException
      marks messages delivered for this character
      Parameters:
      transaction - DBTransaction
      charname - charname - name of character
      Throws:
      SQLException - in case of an database error