org.mule.module.db.internal.domain.connection
Class AbstractDbConnection

java.lang.Object
  extended by org.mule.module.db.internal.domain.connection.AbstractDbConnection
All Implemented Interfaces:
Connection, Wrapper, DbConnection
Direct Known Subclasses:
DefaultDbConnection

public abstract class AbstractDbConnection
extends Object
implements DbConnection

Implements connector side of DbConnection


Field Summary
protected  Connection delegate
           
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
AbstractDbConnection(Connection delegate, TransactionalAction transactionalAction, DefaultDbConnectionReleaser connectionReleaseListener, ParamTypeResolverFactory paramTypeResolverFactory)
           
 
Method Summary
 Map<Integer,DbType> getParamTypes(QueryTemplate queryTemplate)
          Determines actual parameter types for the parameters defined in a query template.
 StatementResultIteratorFactory getStatementResultIteratorFactory(ResultSetHandler resultSetHandler)
          Returns the StatementResultIteratorFactory used to create the StatementResultIterator for this connection.
 TransactionalAction getTransactionalAction()
          Indicates which TransactionalAction used to create this connection
 void release()
          Indicates that the connection is not used anymore
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.sql.Connection
clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Field Detail

delegate

protected final Connection delegate
Constructor Detail

AbstractDbConnection

public AbstractDbConnection(Connection delegate,
                            TransactionalAction transactionalAction,
                            DefaultDbConnectionReleaser connectionReleaseListener,
                            ParamTypeResolverFactory paramTypeResolverFactory)
Method Detail

getStatementResultIteratorFactory

public StatementResultIteratorFactory getStatementResultIteratorFactory(ResultSetHandler resultSetHandler)
Description copied from interface: DbConnection
Returns the StatementResultIteratorFactory used to create the StatementResultIterator for this connection.

Specified by:
getStatementResultIteratorFactory in interface DbConnection
Parameters:
resultSetHandler - used to process resultSets created from this connection
Returns:
the StatementResultIterator for this connection.

getParamTypes

public Map<Integer,DbType> getParamTypes(QueryTemplate queryTemplate)
                                  throws SQLException
Description copied from interface: DbConnection
Determines actual parameter types for the parameters defined in a query template.

Specified by:
getParamTypes in interface DbConnection
Parameters:
queryTemplate - query template that needing parameter resolution
Returns:
a not null map containing the parameter type for each parameter index
Throws:
SQLException - when there are error processing the query

getTransactionalAction

public TransactionalAction getTransactionalAction()
Description copied from interface: DbConnection
Indicates which TransactionalAction used to create this connection

Specified by:
getTransactionalAction in interface DbConnection
Returns:
connection's transactional action

release

public void release()
Description copied from interface: DbConnection
Indicates that the connection is not used anymore

Specified by:
release in interface DbConnection


Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.