Package com.alibaba.druid.util.jdbc
Class ConnectionBase
- java.lang.Object
-
- com.alibaba.druid.util.jdbc.ConnectionBase
-
- All Implemented Interfaces:
AutoCloseable,Connection,Wrapper
- Direct Known Subclasses:
MockConnection
public abstract class ConnectionBase extends Object implements Connection
-
-
Field Summary
-
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
-
Constructor Summary
Constructors Constructor Description ConnectionBase(String url, Properties info)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckState()voidclearWarnings()booleangetAutoCommit()StringgetCatalog()PropertiesgetConnectProperties()intgetHoldability()intgetTransactionIsolation()Map<String,Class<?>>getTypeMap()StringgetUrl()SQLWarninggetWarnings()booleanisReadOnly()voidsetAutoCommit(boolean autoCommit)voidsetCatalog(String catalog)voidsetHoldability(int holdability)voidsetReadOnly(boolean readOnly)voidsetTransactionIsolation(int level)voidsetTypeMap(Map<String,Class<?>> map)voidsetWarnings(SQLWarning warnings)-
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
abort, beginRequest, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, getClientInfo, getClientInfo, getMetaData, getNetworkTimeout, getSchema, isClosed, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setClientInfo, setClientInfo, setNetworkTimeout, setSavepoint, setSavepoint, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Constructor Detail
-
ConnectionBase
public ConnectionBase(String url, Properties info)
-
-
Method Detail
-
getUrl
public String getUrl()
-
getConnectProperties
public Properties getConnectProperties()
-
setAutoCommit
public void setAutoCommit(boolean autoCommit) throws SQLException- Specified by:
setAutoCommitin interfaceConnection- Throws:
SQLException
-
getAutoCommit
public boolean getAutoCommit() throws SQLException- Specified by:
getAutoCommitin interfaceConnection- Throws:
SQLException
-
setCatalog
public void setCatalog(String catalog) throws SQLException
- Specified by:
setCatalogin interfaceConnection- Throws:
SQLException
-
getCatalog
public String getCatalog() throws SQLException
- Specified by:
getCatalogin interfaceConnection- Throws:
SQLException
-
checkState
public void checkState() throws SQLException- Throws:
SQLException
-
setTransactionIsolation
public void setTransactionIsolation(int level) throws SQLException- Specified by:
setTransactionIsolationin interfaceConnection- Throws:
SQLException
-
getTransactionIsolation
public int getTransactionIsolation() throws SQLException- Specified by:
getTransactionIsolationin interfaceConnection- Throws:
SQLException
-
getWarnings
public SQLWarning getWarnings() throws SQLException
- Specified by:
getWarningsin interfaceConnection- Throws:
SQLException
-
clearWarnings
public void clearWarnings() throws SQLException- Specified by:
clearWarningsin interfaceConnection- Throws:
SQLException
-
setWarnings
public void setWarnings(SQLWarning warnings)
-
getTypeMap
public Map<String,Class<?>> getTypeMap() throws SQLException
- Specified by:
getTypeMapin interfaceConnection- Throws:
SQLException
-
setTypeMap
public void setTypeMap(Map<String,Class<?>> map) throws SQLException
- Specified by:
setTypeMapin interfaceConnection- Throws:
SQLException
-
setHoldability
public void setHoldability(int holdability) throws SQLException- Specified by:
setHoldabilityin interfaceConnection- Throws:
SQLException
-
getHoldability
public int getHoldability()
- Specified by:
getHoldabilityin interfaceConnection
-
setReadOnly
public void setReadOnly(boolean readOnly) throws SQLException- Specified by:
setReadOnlyin interfaceConnection- Throws:
SQLException
-
isReadOnly
public boolean isReadOnly() throws SQLException- Specified by:
isReadOnlyin interfaceConnection- Throws:
SQLException
-
-