net.spy.db
Class DBSQL
java.lang.Object
net.spy.SpyObject
net.spy.SpyDB
net.spy.db.SpyCacheDB
net.spy.db.DBSP
net.spy.db.DBSQL
- All Implemented Interfaces:
- DBSPLike
- public abstract class DBSQL
- extends DBSP
Superclass for dynamic SQL calls.
|
Constructor Summary |
DBSQL(Connection conn)
Get a DBSQL object with the given Connection. |
DBSQL(SpyConfig conf)
Get a DBSQL object with the given DBConfig. |
| Methods inherited from class net.spy.db.DBSP |
addParameter, applyArgs, checkArgs, close, executeQuery, executeUpdate, getArguments, getCacheTime, getOptionalArgs, getOutputArgs, getParameters, getParameters, getParameterType, getParams, getPreparedStatement, getQuery, getQueryTimeout, getRequiredArgs, getSPName, getType, getWarnings, isDebugEnabled, main, nextResults, resetArgs, 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, setSmallInt, setSPName |
| Methods inherited from class net.spy.SpyDB |
dbquoteStr, executeQuery, executeUpdate, freeDBConn, getConfig, getConn, getInitType, getSource, init, isClosed, prepareCall, prepareStatement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBSQL
public DBSQL(SpyConfig conf)
throws SQLException
- Get a DBSQL object with the given DBConfig.
DBSQL
public DBSQL(Connection conn)
throws SQLException
- Get a DBSQL object with the given Connection.
registerQuery
protected void registerQuery(String name,
String query)
- Register a named query.
- Parameters:
name - the name of the query (i.e. pgsql)query - the query
setRegisteredQueryMap
protected void setRegisteredQueryMap(Map to)
- Set the Map of registered queries.
- Parameters:
to - the Map of registered queries.
prepare
protected void prepare()
throws SQLException
- Prepare the SQL for execution.
- Overrides:
prepare in class DBSP
- Throws:
SQLException
generateCursorName
protected void generateCursorName()
- Generate (and set) a new cursor name.