Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acs.damsel.srvr.db
Class LowAssetDB  view LowAssetDB download LowAssetDB.java

java.lang.Object
  extended byorg.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

Field Summary
private  java.sql.Connection con
           
private static AssetDB instance
           
private static org.apache.log4j.Logger log
           
 
Constructor Summary
LowAssetDB()
           
 
Method Summary
 Table executeQuery(java.lang.String query)
          Executes a SQL query (i.e., a SELECT statement) and returns a Vector of Vectors containing the result table.
 int executeStatement(java.lang.String statement)
          A generic statement execution method.
private  void reopenConnection()
          Creates a null SQL statement and attempts to execute it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

con

private java.sql.Connection con

instance

private static AssetDB instance

log

private static org.apache.log4j.Logger log
Constructor Detail

LowAssetDB

public LowAssetDB()
           throws java.sql.SQLException
Method Detail

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.