|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jangband.db.DataStore
public class DataStore
Creates the database connection to a standalone HSQLDB. The database is
'db/jangband'.
Provides methods for returning and storing data to the db. These methods could
be split out later, but for now it is convenient to leave them hear.
| Field Summary | |
|---|---|
private java.sql.Connection |
conn
|
| Constructor Summary | |
|---|---|
DataStore()
Initializes the database connection so that other classes have access to game information. |
|
| Method Summary | |
|---|---|
java.util.ArrayList<Gender> |
getGenders()
Gets gender info from the genders table. |
java.util.ArrayList<PlayerRace> |
getPlayerRaces()
Gets racial information from the player_races table. |
private boolean |
initConnection()
Returns false if the connection fails. |
void |
start()
Called by Pico Container. |
void |
stop()
Called by Pico Container. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.sql.Connection conn
| Constructor Detail |
|---|
public DataStore()
| Method Detail |
|---|
public void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startableprivate boolean initConnection()
public java.util.ArrayList<Gender> getGenders()
public java.util.ArrayList<PlayerRace> getPlayerRaces()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||