|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object eShopper.eShopperDB
This class provides database access to eShopper. When eShopper is started, an instance of an eShopperDB should be created, and all database interaction should go through that instance. This uses hsqldb (http://hsqldb.sourceforge.net/) for the database, and the hsqldb.jar must be in the classpath or in the eShopper jar. The eShopper database files must be in the db subdirectory of eShopper.
Constructor Summary | |
eShopperDB()
|
Method Summary | |
java.sql.ResultSet |
query(java.lang.String expression)
This method is used for executing the SQL commands CREATE and SELECT. |
void |
shutdown()
If there are no other open connections, the database is written out to files and shuts down. |
boolean |
update(java.lang.String expression)
This method is used for executing the SQL commands DROP, INSERT and UPDATE. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public eShopperDB()
Method Detail |
public void shutdown() throws java.sql.SQLException
java.sql.SQLException
public boolean update(java.lang.String expression) throws java.sql.SQLException
expression
- The SQL command to be executed.
java.sql.SQLException
- If there is a database error.public java.sql.ResultSet query(java.lang.String expression) throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |