|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.iac.ing.codeso.gen.DbAccess
public class DbAccess
Provides a means of retrieving a set of configurations from a database.
Nested Class Summary | |
---|---|
static class |
DbAccess.DbAccessException
Describes all exceptions generated by the DbAccess class. |
Constructor Summary | |
---|---|
DbAccess()
Constructs a new database access object |
|
DbAccess(java.lang.String dbSourceUrl,
java.lang.String dbUser,
java.lang.String dbPassword)
Constructs a new database access object to access the specified resource. |
Method Summary | |
---|---|
void |
close()
Closes down the database in an orderly way and frees up any associated resources. |
java.sql.ResultSet |
executeSqlQuery(java.lang.String sqlQuery)
Retrieves a resultset based on the supplied query. |
java.util.LinkedHashMap<java.lang.String,java.lang.String> |
readSubSystemConfigurationData(java.lang.String tableName)
Given the name of the appropriate table, retrieves a hashtable containing all the configurations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbAccess() throws DbAccess.DbAccessException
DbAccess.DbAccessException
- if some problem occurs.public DbAccess(java.lang.String dbSourceUrl, java.lang.String dbUser, java.lang.String dbPassword) throws DbAccess.DbAccessException
dbSourceUrl
- String specifying the URL of the database to
connect to.dbUser
- String specifying the user name to be used for
the connection.dbPassword
- String specifying the password to be used for the
connection.
DbAccess.DbAccessException
- if some problem occurs.Method Detail |
---|
public java.util.LinkedHashMap<java.lang.String,java.lang.String> readSubSystemConfigurationData(java.lang.String tableName) throws DbAccess.DbAccessException
tableName
- name of database table
DbAccess.DbAccessException
- if some access error occurredpublic java.sql.ResultSet executeSqlQuery(java.lang.String sqlQuery) throws DbAccess.DbAccessException
sqlQuery
- String specifying the SQL query to be executed
DbAccess.DbAccessException
- if some access error occurredpublic void close()
It is the responsibility of users to ensure that this method is called once database access is no longer required.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |