|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.database.DatabaseAdaptor
DatabaseAdaptor provides a generic adaptor to wrap database specific code. For example, making a SQL array requires database specific code.
| Constructor Summary | |
DatabaseAdaptor()
|
|
| Method Summary | |
abstract java.sql.Array |
getArray(java.lang.String type,
java.sql.Connection connection,
java.lang.Object array)
Get an SQL Array given an SQL array type, connection and a primitive array |
java.sql.Connection |
getConnection(ConnectionDictionary dictionary)
Get a new database connection |
abstract java.sql.Connection |
getConnection(java.lang.String urlSpec,
java.lang.String user,
java.lang.String password)
Get a new database connection |
static DatabaseAdaptor |
getInstance()
Get a new database adaptor using the default database adaptor |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DatabaseAdaptor()
| Method Detail |
public abstract java.sql.Array getArray(java.lang.String type,
java.sql.Connection connection,
java.lang.Object array)
throws DatabaseException
type - An SQL array type identifying the type of arrayconnection - An SQL connectionarray - The primitive Java array
DatabaseException - if a database exception is thrown
public abstract java.sql.Connection getConnection(java.lang.String urlSpec,
java.lang.String user,
java.lang.String password)
throws DatabaseException
urlSpec - The URL to which to connectuser - The user loggin into the databasepassword - the user's password
DatabaseException - if a database exception is thrown
public java.sql.Connection getConnection(ConnectionDictionary dictionary)
throws DatabaseException
dictionary - A connection dictionary
DatabaseException - if a database exception is thrownpublic static DatabaseAdaptor getInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||