Class StendhalBuddyDAO
java.lang.Object
games.stendhal.server.core.engine.db.StendhalBuddyDAO
database access for the redundant buddy table used on the website
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isIgnored(DBTransaction transaction, String character, String candidate)
checks whether a palyer is ignored by another playerloadRelations(DBTransaction transaction, String charname)
loads the relationship lists for the specified charnamevoid
saveRelations(DBTransaction transaction, String charname, Player player)
saves the buddy list for the specified charname
-
Constructor Details
-
StendhalBuddyDAO
public StendhalBuddyDAO()
-
-
Method Details
-
loadRelations
public com.google.common.collect.Multimap<String,String> loadRelations(DBTransaction transaction, String charname) throws SQLExceptionloads the relationship lists for the specified charname- Parameters:
transaction
- DBTransactioncharname
- 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 SQLExceptionchecks whether a palyer is ignored by another player- Parameters:
transaction
- DBTransactioncharacter
- character whose ignore list is checkedcandidate
- 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 SQLExceptionsaves the buddy list for the specified charname- Parameters:
transaction
- transactioncharname
- name of charplayer
- player- Throws:
SQLException
- in case of an database error
-