com.agimatec.sql.query
Class JdbcExecutor
java.lang.Object
com.agimatec.sql.query.JdbcExecutor
- Direct Known Subclasses:
- JdbcQueryUtil
public abstract class JdbcExecutor
- extends Object
Abstract superclass of classes that execute direct sql statements.
- Author:
- Roman Stumm
|
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
JdbcExecutor
public JdbcExecutor()
fetchResult
protected QueryResult fetchResult(SQLStatement aQuery,
JdbcResultBuilder resultBuilder,
QueryDefinition queryDefinition)
throws SQLException
- execute a SQL-QUERY (select) and return a LookupResult
- Parameters:
aQuery - - the SQLStatementresultBuilder - - a result visitor that builds the result rows or objectsqueryDefinition - - the max. number of rows to build (or GenericQuery.C_Unlimited)
- Returns:
- a LookupResult
- Throws:
Exception
SQLException
execRowsAffected
protected int execRowsAffected(SQLStatement aSQL)
throws SQLException
- execute an sql (update/delete/insert) statement and return the number of rows affected
- Returns:
- the number of rows affected (if the database provides that info)
- Throws:
SQLException
newResultVisitor
protected JdbcResultBuilder newResultVisitor(String className)
getConnection
public abstract Connection getConnection()
Copyright © 2008-2012. All Rights Reserved.