Class StendhalHallOfFameDAO
java.lang.Object
games.stendhal.server.core.engine.db.StendhalHallOfFameDAO
database access for the hall of fame used in deathmatch
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCharactersByFametype(DBTransaction transaction, String fametype, int max, boolean ascending)
gets the characters who have taken part in the specified fametypeint
getHallOfFamePoints(DBTransaction transaction, String charname, String fametype)
Returns the points in the specified hall of fame.void
setHallOfFamePoints(DBTransaction transaction, String charname, String fametype, int points)
Stores an entry in the hall of fame.
-
Constructor Details
-
StendhalHallOfFameDAO
public StendhalHallOfFameDAO()
-
-
Method Details
-
getHallOfFamePoints
Returns the points in the specified hall of fame.- Parameters:
transaction
- Transactioncharname
- name of the playerfametype
- 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 SQLExceptionStores an entry in the hall of fame.- Parameters:
transaction
- Transactioncharname
- name of the playerfametype
- type of the hall of famepoints
- 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 SQLExceptiongets the characters who have taken part in the specified fametype- Parameters:
transaction
- a DBTransactionfametype
- type of famemax
- maximum number of returned charactersascending
- sort ascending or descending- Returns:
- list of character names
- Throws:
SQLException
- in case of an database error
-