public class DefaultDbConnection extends AbstractDbConnection
Connection behaviour to a delegate| Modifier and Type | Field and Description |
|---|---|
static int |
ATTR_TYPE_NAME_INDEX |
static int |
DATA_TYPE_INDEX |
protected org.slf4j.Logger |
logger |
protected static int |
UNKNOWN_DATA_TYPE |
delegateTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Constructor and Description |
|---|
DefaultDbConnection(Connection delegate,
TransactionalAction transactionalAction,
DefaultDbConnectionReleaser connectionReleaseListener,
ParamTypeResolverFactory paramTypeResolverFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort(Executor executor) |
void |
clearWarnings() |
void |
close() |
void |
commit() |
Array |
createArrayOf(String typeName,
Object[] elements) |
Blob |
createBlob() |
Clob |
createClob() |
NClob |
createNClob() |
SQLXML |
createSQLXML() |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
Struct |
createStruct(String typeName,
Object[] attributes) |
void |
doResolveLobIn(Object[] attributes,
int index,
int dataType,
String dataTypeName) |
void |
doResolveLobIn(Object[] attributes,
int index,
String dataTypeName) |
boolean |
getAutoCommit() |
String |
getCatalog() |
Properties |
getClientInfo() |
String |
getClientInfo(String name) |
int |
getHoldability() |
protected Map<Integer,ResolvedDbType> |
getLobFieldsDataTypeInfo(String typeName) |
DatabaseMetaData |
getMetaData() |
int |
getNetworkTimeout() |
String |
getSchema() |
int |
getTransactionIsolation() |
Map<String,Class<?>> |
getTypeMap() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isReadOnly() |
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(Class<?> iface) |
String |
nativeSQL(String sql) |
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
void |
releaseSavepoint(Savepoint savepoint) |
protected void |
resolveLobs(String typeName,
Object[] attributes,
TypeResolver typeResolver)
Management of lob resolution for UDTs in structs
By default, nothing is done
|
void |
rollback() |
void |
rollback(Savepoint savepoint) |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(String catalog) |
void |
setClientInfo(Properties properties) |
void |
setClientInfo(String name,
String value) |
void |
setHoldability(int holdability) |
void |
setNetworkTimeout(Executor executor,
int milliseconds) |
void |
setReadOnly(boolean readOnly) |
Savepoint |
setSavepoint() |
Savepoint |
setSavepoint(String name) |
void |
setSchema(String schema) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(Map<String,Class<?>> stringClassMap) |
<T> T |
unwrap(Class<T> iface) |
getParamTypes, getStatementResultIteratorFactory, getTransactionalAction, releaseprotected final org.slf4j.Logger logger
protected static final int UNKNOWN_DATA_TYPE
public static final int DATA_TYPE_INDEX
public static final int ATTR_TYPE_NAME_INDEX
public DefaultDbConnection(Connection delegate, TransactionalAction transactionalAction, DefaultDbConnectionReleaser connectionReleaseListener, ParamTypeResolverFactory paramTypeResolverFactory)
public Statement createStatement() throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLException
SQLExceptionpublic CallableStatement prepareCall(String sql) throws SQLException
SQLExceptionpublic String nativeSQL(String sql) throws SQLException
SQLExceptionpublic void setAutoCommit(boolean autoCommit)
throws SQLException
SQLExceptionpublic boolean getAutoCommit()
throws SQLException
SQLExceptionpublic void commit()
throws SQLException
SQLExceptionpublic void rollback()
throws SQLException
SQLExceptionpublic void close()
throws SQLException
SQLExceptionpublic boolean isClosed()
throws SQLException
SQLExceptionpublic DatabaseMetaData getMetaData() throws SQLException
SQLExceptionpublic void setReadOnly(boolean readOnly)
throws SQLException
SQLExceptionpublic boolean isReadOnly()
throws SQLException
SQLExceptionpublic void setCatalog(String catalog) throws SQLException
SQLExceptionpublic String getCatalog() throws SQLException
SQLExceptionpublic void setTransactionIsolation(int level)
throws SQLException
SQLExceptionpublic int getTransactionIsolation()
throws SQLException
SQLExceptionpublic SQLWarning getWarnings() throws SQLException
SQLExceptionpublic void clearWarnings()
throws SQLException
SQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic Map<String,Class<?>> getTypeMap() throws SQLException
SQLExceptionpublic void setTypeMap(Map<String,Class<?>> stringClassMap) throws SQLException
SQLExceptionpublic void setHoldability(int holdability)
throws SQLException
SQLExceptionpublic int getHoldability()
throws SQLException
SQLExceptionpublic Savepoint setSavepoint() throws SQLException
SQLExceptionpublic Savepoint setSavepoint(String name) throws SQLException
SQLExceptionpublic void rollback(Savepoint savepoint) throws SQLException
SQLExceptionpublic void releaseSavepoint(Savepoint savepoint) throws SQLException
SQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
SQLExceptionpublic Clob createClob() throws SQLException
SQLExceptionpublic Blob createBlob() throws SQLException
SQLExceptionpublic NClob createNClob() throws SQLException
SQLExceptionpublic SQLXML createSQLXML() throws SQLException
SQLExceptionpublic boolean isValid(int timeout)
throws SQLException
SQLExceptionpublic void setClientInfo(String name, String value) throws SQLClientInfoException
SQLClientInfoExceptionpublic void setClientInfo(Properties properties) throws SQLClientInfoException
SQLClientInfoExceptionpublic String getClientInfo(String name) throws SQLException
SQLExceptionpublic Properties getClientInfo() throws SQLException
SQLExceptionpublic Array createArrayOf(String typeName, Object[] elements) throws SQLException
SQLExceptionpublic Struct createStruct(String typeName, Object[] attributes) throws SQLException
SQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
SQLExceptionpublic boolean isWrapperFor(Class<?> iface) throws SQLException
SQLExceptionpublic void setSchema(String schema) throws SQLException
SQLExceptionpublic String getSchema() throws SQLException
SQLExceptionpublic void abort(Executor executor) throws SQLException
SQLExceptionpublic void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
SQLExceptionpublic int getNetworkTimeout()
throws SQLException
SQLExceptionprotected void resolveLobs(String typeName, Object[] attributes, TypeResolver typeResolver) throws SQLException
AbstractDbConnectionresolveLobs in class AbstractDbConnectiontypeName - type name of the UDTattributes - attributes of the struct to populateSQLException - raises if a problems occurs on retrieval of the metadataprotected Map<Integer,ResolvedDbType> getLobFieldsDataTypeInfo(String typeName) throws SQLException
SQLExceptionpublic void doResolveLobIn(Object[] attributes, int index, int dataType, String dataTypeName) throws SQLException
SQLExceptionpublic void doResolveLobIn(Object[] attributes, int index, String dataTypeName) throws SQLException
SQLExceptionCopyright © 2003–2021 MuleSoft, Inc.. All rights reserved.