Class StoreMessageCommand

java.lang.Object
marauroa.server.db.command.AbstractDBCommand
games.stendhal.server.core.engine.dbcommand.StoreMessageCommand
All Implemented Interfaces:
DBCommand

public class StoreMessageCommand extends AbstractDBCommand
Store postman messages for a player, if a character for them exists Can find out from this function if the character existed
Author:
kymara
  • Constructor Details

    • StoreMessageCommand

      public StoreMessageCommand(String source, String target, String message, String messagetype)
      creates a new StoreMessageCommand
      Parameters:
      source - who left the message
      target - the player name the message is for
      message - what the message is
      messagetype - N for NPCs, S for support, P for player
  • Method Details

    • execute

      public void execute(DBTransaction transaction) throws SQLException
      Description copied from class: AbstractDBCommand
      processes the database request.
      Specified by:
      execute in interface DBCommand
      Specified by:
      execute in class AbstractDBCommand
      Parameters:
      transaction - DBTransaction
      Throws:
      SQLException - in case of an database error
    • targetCharacterExists

      public boolean targetCharacterExists()
      checks if account name could be found - which tells if the character whom the message was for, existed
      Returns:
      true if an account was found for that character name
    • isIgnored

      public boolean isIgnored()
      is ignored
      Returns:
      ignored
    • getTarget

      public String getTarget()
      To access the character name we queried
      Returns:
      target the character who we checked for
    • getSource

      public String getSource()
      To access the source message sender
      Returns:
      source who sent the message
    • getMessage

      public String getMessage()
      To access the message
      Returns:
      message
    • toString

      public String toString()
      returns a string suitable for debug output of this DBCommand.
      Overrides:
      toString in class Object
      Returns:
      debug string