Class StendhalHallOfFameDAO

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

public class StendhalHallOfFameDAO extends Object
database access for the hall of fame used in deathmatch
Author:
hendrik
  • Constructor Details

    • StendhalHallOfFameDAO

      public StendhalHallOfFameDAO()
  • Method Details

    • getHallOfFamePoints

      public int getHallOfFamePoints(DBTransaction transaction, String charname, String fametype)
      Returns the points in the specified hall of fame.
      Parameters:
      transaction - Transaction
      charname - name of the player
      fametype - type of the hall of fame
      Returns:
      points or 0 in case there is no entry
    • setHallOfFamePoints

      public void setHallOfFamePoints(DBTransaction transaction, String charname, String fametype, int points) throws SQLException
      Stores an entry in the hall of fame.
      Parameters:
      transaction - Transaction
      charname - name of the player
      fametype - type of the hall of fame
      points - points to store
      Throws:
      SQLException - in case of an database error
    • getCharactersByFametype

      public List<String> getCharactersByFametype(DBTransaction transaction, String fametype, int max, boolean ascending) throws SQLException
      gets the characters who have taken part in the specified fametype
      Parameters:
      transaction - a DBTransaction
      fametype - type of fame
      max - maximum number of returned characters
      ascending - sort ascending or descending
      Returns:
      list of character names
      Throws:
      SQLException - in case of an database error