java.lang.Object
org.acs.damsel.srvr.db.LowAssetDB
- public class LowAssetDB
- extends java.lang.Object
Title: Low-level database access via JDBC
Description:
This Class contains the low level methods of the AssetDB class.
Methods include the basic constructor, executeQuery and executeStatement
- Version:
- 1.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
con
private java.sql.Connection con
instance
private static AssetDB instance
log
private static org.apache.log4j.Logger log
LowAssetDB
public LowAssetDB()
throws java.sql.SQLException
executeQuery
public Table executeQuery(java.lang.String query)
throws java.sql.SQLException
- Executes a SQL query (i.e., a SELECT statement) and returns a Vector of
Vectors containing the result table. A SQLException is thrown if there is
a problem with the database or the SQL statement itself.
executeStatement
public int executeStatement(java.lang.String statement)
throws java.sql.SQLException
- A generic statement execution method. Not for use with queries as it does
not return a resultset.
reopenConnection
private void reopenConnection()
throws java.sql.SQLException
- Creates a null SQL statement and attempts to execute it. If this causes
an exception, then the database connection is closed and reopened.