Class StendhalBuddyDAO

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

public class StendhalBuddyDAO extends Object
database access for the redundant buddy table used on the website
  • Constructor Details

    • StendhalBuddyDAO

      public StendhalBuddyDAO()
  • Method Details

    • loadRelations

      public com.google.common.collect.Multimap<String,​String> loadRelations(DBTransaction transaction, String charname) throws SQLException
      loads the relationship lists for the specified charname
      Parameters:
      transaction - DBTransaction
      charname - name of char
      Returns:
      buddy list
      Throws:
      SQLException - in case of an database error
    • isIgnored

      public boolean isIgnored(DBTransaction transaction, String character, String candidate) throws SQLException
      checks whether a palyer is ignored by another player
      Parameters:
      transaction - DBTransaction
      character - character whose ignore list is checked
      candidate - candidate who might have been ignored
      Returns:
      true, if the player is ginored, false otherwise
      Throws:
      SQLException - SQLException
    • saveRelations

      public void saveRelations(DBTransaction transaction, String charname, Player player) throws SQLException
      saves the buddy list for the specified charname
      Parameters:
      transaction - transaction
      charname - name of char
      player - player
      Throws:
      SQLException - in case of an database error