|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object DatabaseManager
Class that handles the connection with the database
Constructor Summary | |
DatabaseManager(java.lang.String driver,
java.lang.String url)
Constructor that takes the driver name and url |
Method Summary | |
java.util.List |
getListForQuery(java.lang.String query)
Method to execute a query and return a list of strings for the first returned row |
java.lang.String |
getStringForQuery(java.lang.String query)
Method to execute a query and return a string of the first result |
static void |
main(java.lang.String[] args)
|
void |
testConnection()
Method for testing the connection |
void |
testQuery(java.lang.String query,
int numCols)
Method to test a query and print the results |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DatabaseManager(java.lang.String driver, java.lang.String url)
driver
- the class that communicates with the
databaseurl
- the url of the database as a stringMethod Detail |
public void testConnection()
public void testQuery(java.lang.String query, int numCols)
query
- the query to executenumCols
- the number of columns in the resultpublic java.lang.String getStringForQuery(java.lang.String query)
query
- the query to execute
public java.util.List getListForQuery(java.lang.String query)
query
- the query to execute
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |