|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectDatabaseManager
public class DatabaseManager
Class that handles the connection with the database
| Constructor Summary | |
|---|---|
DatabaseManager(String driver,
String url)
Constructor that takes the driver name and url |
|
| Method Summary | |
|---|---|
List |
getListForQuery(String query)
Method to execute a query and return a list of strings for the first returned row |
String |
getStringForQuery(String query)
Method to execute a query and return a string of the first result |
static void |
main(String[] args)
|
void |
testConnection()
Method for testing the connection |
void |
testQuery(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(String driver,
String url)
driver - the class that communicates with the
databaseurl - the url of the database as a string| Method Detail |
|---|
public void testConnection()
public void testQuery(String query,
int numCols)
query - the query to executenumCols - the number of columns in the resultpublic String getStringForQuery(String query)
query - the query to execute
public List getListForQuery(String query)
query - the query to execute
public static void main(String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||