net.spy.db
Class DBSQL

java.lang.Object
  extended by net.spy.SpyObject
      extended by net.spy.db.SpyDB
          extended by net.spy.db.SpyCacheDB
              extended by net.spy.db.DBSP
                  extended by net.spy.db.DBSQL
All Implemented Interfaces:
DBSPLike

public abstract class DBSQL
extends DBSP

Superclass for dynamic SQL calls.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.spy.db.DBSP
DBSP.Argument, DBSP.NamedObject, DBSP.Parameter
 
Field Summary
 
Fields inherited from class net.spy.db.SpyDB
INIT_FROM_CONFIG, INIT_FROM_CONN
 
Constructor Summary
DBSQL(java.sql.Connection conn)
          Get a DBSQL object with the given Connection.
DBSQL(SpyConfig conf)
          Get a DBSQL object with the given DBConfig.
 
Method Summary
protected  void generateCursorName()
          Generate (and set) a new cursor name.
 java.util.Map getRegisteredQueries()
          Get the registered queries.
protected  void prepare()
          Prepare the SQL for execution.
protected  void setRegisteredQueryMap(java.util.Map to)
          Set the Map of registered queries.
 
Methods inherited from class net.spy.db.DBSP
addParameter, applyArgs, checkArgs, close, executeQuery, executeUpdate, getArguments, getCacheTime, getParameters, getParameters, getParameterType, getParams, getPreparedStatement, getQuery, getQueryTimeout, getSPName, getType, getWarnings, isDebugEnabled, nextResults, resetArgs, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setArg, setCacheTime, setCoerced, setCursorName, setDebug, setMaxRows, setNull, setOptional, setOutput, setPreparedStatement, setQuery, setQueryTimeout, setRequired, setSPName, setTinyInt
 
Methods inherited from class net.spy.db.SpyCacheDB
executeQuery, prepareStatement
 
Methods inherited from class net.spy.db.SpyDB
dbquoteStr, executeQuery, executeUpdate, freeDBConn, getConfig, getConn, getInitType, getSource, init, isClosed, prepareCall, prepareStatement
 
Methods inherited from class net.spy.SpyObject
getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBSQL

public DBSQL(SpyConfig conf)
      throws java.sql.SQLException
Get a DBSQL object with the given DBConfig.

Throws:
java.sql.SQLException

DBSQL

public DBSQL(java.sql.Connection conn)
      throws java.sql.SQLException
Get a DBSQL object with the given Connection.

Throws:
java.sql.SQLException
Method Detail

setRegisteredQueryMap

protected void setRegisteredQueryMap(java.util.Map to)
Set the Map of registered queries.

Parameters:
to - the Map of registered queries.

getRegisteredQueries

public java.util.Map getRegisteredQueries()
Get the registered queries.

Returns:
an unmodifiable Map showing the registered queries.

prepare

protected void prepare()
                throws java.sql.SQLException
Prepare the SQL for execution.

Overrides:
prepare in class DBSP
Throws:
java.sql.SQLException

generateCursorName

protected void generateCursorName()
                           throws java.sql.SQLException
Generate (and set) a new cursor name.

Throws:
java.sql.SQLException


Copyright © 1995-2005 SPY Internetworking. All Rights Reserved.