org.mule.module.db.internal.domain.executor
Class AbstractSingleQueryExecutor

java.lang.Object
  extended by org.mule.module.db.internal.domain.executor.AbstractExecutor
      extended by 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


Field Summary
 
Fields inherited from class org.mule.module.db.internal.domain.executor.AbstractExecutor
logger, queryLoggerFactory, statementFactory
 
Constructor Summary
AbstractSingleQueryExecutor(StatementFactory statementFactory)
           
 
Method Summary
protected abstract  Object doExecuteQuery(DbConnection connection, Statement statement, Query query)
           
protected abstract  Object doExecuteQuery(DbConnection dbConnection, Statement statement, Query query, AutoGeneratedKeyStrategy autoGeneratedKeyStrategy)
           
 Object execute(DbConnection connection, Query query)
          Executes a query
 Object execute(DbConnection connection, Query query, AutoGeneratedKeyStrategy autoGeneratedKeyStrategy)
           
protected  void prepareQuery(Statement statement, Query query)
           
 
Methods inherited from class org.mule.module.db.internal.domain.executor.AbstractExecutor
doProcessParameters, processInputParam, setQueryLoggerFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSingleQueryExecutor

public AbstractSingleQueryExecutor(StatementFactory statementFactory)
Method Detail

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 null
query - 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 null
query - query to execute. Non null
autoGeneratedKeyStrategy - 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.