liquibase.database.jvm
Class JdbcConnection
java.lang.Object
liquibase.database.jvm.JdbcConnection
- All Implemented Interfaces:
- DatabaseConnection
- Direct Known Subclasses:
- DerbyConnection, HsqlConnection, SybaseConnection
public class JdbcConnection
- extends Object
- implements DatabaseConnection
A ConnectionWrapper implementation which delegates completely to an
underlying java.sql.connection.
- Author:
- Paul Keeble
Method Summary |
void |
clearWarnings()
|
void |
close()
|
void |
commit()
|
Statement |
createStatement()
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
boolean |
equals(Object obj)
|
boolean |
getAutoCommit()
|
String |
getCatalog()
|
String |
getConnectionUserName()
|
int |
getDatabaseMajorVersion()
|
int |
getDatabaseMinorVersion()
|
String |
getDatabaseProductName()
|
String |
getDatabaseProductVersion()
|
int |
getHoldability()
|
DatabaseMetaData |
getMetaData()
|
int |
getTransactionIsolation()
|
Map<String,Class<?>> |
getTypeMap()
|
Connection |
getUnderlyingConnection()
|
String |
getURL()
|
SQLWarning |
getWarnings()
|
Connection |
getWrappedConnection()
Returns the connection that this Delegate is using. |
int |
hashCode()
|
boolean |
isClosed()
|
boolean |
isReadOnly()
|
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)
|
void |
rollback()
|
void |
rollback(Savepoint savepoint)
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(String catalog)
|
void |
setHoldability(int holdability)
|
void |
setReadOnly(boolean readOnly)
|
Savepoint |
setSavepoint()
|
Savepoint |
setSavepoint(String name)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(Map<String,Class<?>> map)
|
JdbcConnection
public JdbcConnection(Connection connection)
getDatabaseProductName
public String getDatabaseProductName()
throws DatabaseException
- Specified by:
getDatabaseProductName
in interface DatabaseConnection
- Throws:
DatabaseException
getDatabaseProductVersion
public String getDatabaseProductVersion()
throws DatabaseException
- Specified by:
getDatabaseProductVersion
in interface DatabaseConnection
- Throws:
DatabaseException
getDatabaseMajorVersion
public int getDatabaseMajorVersion()
throws DatabaseException
- Specified by:
getDatabaseMajorVersion
in interface DatabaseConnection
- Throws:
DatabaseException
getDatabaseMinorVersion
public int getDatabaseMinorVersion()
throws DatabaseException
- Specified by:
getDatabaseMinorVersion
in interface DatabaseConnection
- Throws:
DatabaseException
getURL
public String getURL()
- Specified by:
getURL
in interface DatabaseConnection
getConnectionUserName
public String getConnectionUserName()
- Specified by:
getConnectionUserName
in interface DatabaseConnection
getWrappedConnection
public Connection getWrappedConnection()
- Returns the connection that this Delegate is using.
- Returns:
- The connection originally passed in the constructor
clearWarnings
public void clearWarnings()
throws DatabaseException
- Throws:
DatabaseException
close
public void close()
throws DatabaseException
- Specified by:
close
in interface DatabaseConnection
- Throws:
DatabaseException
commit
public void commit()
throws DatabaseException
- Specified by:
commit
in interface DatabaseConnection
- Throws:
DatabaseException
createStatement
public Statement createStatement()
throws DatabaseException
- Throws:
DatabaseException
createStatement
public Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws DatabaseException
- Throws:
DatabaseException
createStatement
public Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws DatabaseException
- Throws:
DatabaseException
getAutoCommit
public boolean getAutoCommit()
throws DatabaseException
- Specified by:
getAutoCommit
in interface DatabaseConnection
- Throws:
DatabaseException
getCatalog
public String getCatalog()
throws DatabaseException
- Specified by:
getCatalog
in interface DatabaseConnection
- Throws:
DatabaseException
getHoldability
public int getHoldability()
throws DatabaseException
- Throws:
DatabaseException
getMetaData
public DatabaseMetaData getMetaData()
throws DatabaseException
- Throws:
DatabaseException
getTransactionIsolation
public int getTransactionIsolation()
throws DatabaseException
- Throws:
DatabaseException
getTypeMap
public Map<String,Class<?>> getTypeMap()
throws DatabaseException
- Throws:
DatabaseException
getWarnings
public SQLWarning getWarnings()
throws DatabaseException
- Throws:
DatabaseException
isClosed
public boolean isClosed()
throws DatabaseException
- Specified by:
isClosed
in interface DatabaseConnection
- Throws:
DatabaseException
isReadOnly
public boolean isReadOnly()
throws DatabaseException
- Throws:
DatabaseException
nativeSQL
public String nativeSQL(String sql)
throws DatabaseException
- Specified by:
nativeSQL
in interface DatabaseConnection
- Throws:
DatabaseException
prepareCall
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws DatabaseException
- Throws:
DatabaseException
prepareCall
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency)
throws DatabaseException
- Throws:
DatabaseException
prepareCall
public CallableStatement prepareCall(String sql)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public PreparedStatement prepareStatement(String sql,
int autoGeneratedKeys)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public PreparedStatement prepareStatement(String sql,
int[] columnIndexes)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public PreparedStatement prepareStatement(String sql,
String[] columnNames)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public PreparedStatement prepareStatement(String sql)
throws DatabaseException
- Throws:
DatabaseException
releaseSavepoint
public void releaseSavepoint(Savepoint savepoint)
throws DatabaseException
- Throws:
DatabaseException
rollback
public void rollback()
throws DatabaseException
- Specified by:
rollback
in interface DatabaseConnection
- Throws:
DatabaseException
rollback
public void rollback(Savepoint savepoint)
throws DatabaseException
- Throws:
DatabaseException
setAutoCommit
public void setAutoCommit(boolean autoCommit)
throws DatabaseException
- Specified by:
setAutoCommit
in interface DatabaseConnection
- Throws:
DatabaseException
setCatalog
public void setCatalog(String catalog)
throws DatabaseException
- Throws:
DatabaseException
setHoldability
public void setHoldability(int holdability)
throws DatabaseException
- Throws:
DatabaseException
setReadOnly
public void setReadOnly(boolean readOnly)
throws DatabaseException
- Throws:
DatabaseException
setSavepoint
public Savepoint setSavepoint()
throws DatabaseException
- Throws:
DatabaseException
setSavepoint
public Savepoint setSavepoint(String name)
throws DatabaseException
- Throws:
DatabaseException
setTransactionIsolation
public void setTransactionIsolation(int level)
throws DatabaseException
- Throws:
DatabaseException
setTypeMap
public void setTypeMap(Map<String,Class<?>> map)
throws DatabaseException
- Throws:
DatabaseException
getUnderlyingConnection
public Connection getUnderlyingConnection()
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2013 Liquibase.org. All Rights Reserved.