Class QueryCanonicalCharacterNamesCommand

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

public class QueryCanonicalCharacterNamesCommand extends AbstractDBCommand
Retrieves the canonical name of a number of characters.
Author:
kymara / M. Fuchs
  • Constructor Details

    • QueryCanonicalCharacterNamesCommand

      public QueryCanonicalCharacterNamesCommand(Player player, Collection<String> namesToCheck)
      Creates a new QueryCanonicalCharacterNamesCommand.
      Parameters:
      player - the player the check originated from
      namesToCheck - the character names to check
  • 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
    • getPlayer

      public Player getPlayer()
      To access the player sending the query
      Returns:
      player
    • getQueriedNames

      public Collection<String> getQueriedNames()
      . Return the character name we queried
      Returns:
      character names to be checked
    • getValidNames

      public Collection<String> getValidNames()
      Return the character name we found to be valid.
      Returns:
      the unique character names we found to be valid
    • toString

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