org.mule.module.db.internal.domain.executor
Class AbstractSingleQueryExecutor
java.lang.Object
org.mule.module.db.internal.domain.executor.AbstractExecutor
org.mule.module.db.internal.domain.executor.AbstractSingleQueryExecutor
- All Implemented Interfaces:
- QueryExecutor
- Direct Known Subclasses:
- SelectExecutor, StoredProcedureExecutor, UpdateExecutor
public abstract class AbstractSingleQueryExecutor
- extends AbstractExecutor
- implements QueryExecutor
Base class for executors that execute a single query
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSingleQueryExecutor
public AbstractSingleQueryExecutor(StatementFactory statementFactory)
execute
public Object execute(DbConnection connection,
Query query)
throws SQLException
- Description copied from interface:
QueryExecutor
- Executes a query
- Specified by:
execute in interface QueryExecutor
- Parameters:
connection - connection to the database where the query will be executed. Non nullquery - query to execute. Non null
- Returns:
- a non null result of the query execution
- Throws:
SQLException - if a database access error occurs or this method is called on a closed connection
execute
public Object execute(DbConnection connection,
Query query,
AutoGeneratedKeyStrategy autoGeneratedKeyStrategy)
throws SQLException
- Specified by:
execute in interface QueryExecutor
- Parameters:
connection - connection to the database where the query will be executed. Non nullquery - query to execute. Non nullautoGeneratedKeyStrategy - strategy used to process auto generated keys. Non null
- Returns:
- a non null result of the query execution
- Throws:
SQLException - if a database access error occurs or this method is called on a closed connection or
there is an error processing auto generated keys
doExecuteQuery
protected abstract Object doExecuteQuery(DbConnection connection,
Statement statement,
Query query)
throws SQLException
- Throws:
SQLException
doExecuteQuery
protected abstract Object doExecuteQuery(DbConnection dbConnection,
Statement statement,
Query query,
AutoGeneratedKeyStrategy autoGeneratedKeyStrategy)
throws SQLException
- Throws:
SQLException
prepareQuery
protected void prepareQuery(Statement statement,
Query query)
throws SQLException
- Throws:
SQLException
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.