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 java.lang.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()
|
java.sql.Statement |
createStatement()
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
boolean |
equals(java.lang.Object obj)
|
boolean |
getAutoCommit()
|
java.lang.String |
getCatalog()
|
java.lang.String |
getConnectionUserName()
|
int |
getDatabaseMajorVersion()
|
int |
getDatabaseMinorVersion()
|
java.lang.String |
getDatabaseProductName()
|
java.lang.String |
getDatabaseProductVersion()
|
int |
getHoldability()
|
java.sql.DatabaseMetaData |
getMetaData()
|
int |
getTransactionIsolation()
|
java.util.Map<java.lang.String,java.lang.Class<?>> |
getTypeMap()
|
java.sql.Connection |
getUnderlyingConnection()
|
java.lang.String |
getURL()
|
java.sql.SQLWarning |
getWarnings()
|
java.sql.Connection |
getWrappedConnection()
Returns the connection that this Delegate is using. |
int |
hashCode()
|
boolean |
isClosed()
|
boolean |
isReadOnly()
|
java.lang.String |
nativeSQL(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
rollback()
|
void |
rollback(java.sql.Savepoint savepoint)
|
void |
setAutoCommit(boolean autoCommit)
|
void |
setCatalog(java.lang.String catalog)
|
void |
setHoldability(int holdability)
|
void |
setReadOnly(boolean readOnly)
|
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
void |
setTransactionIsolation(int level)
|
void |
setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
JdbcConnection
public JdbcConnection(java.sql.Connection connection)
getDatabaseProductName
public java.lang.String getDatabaseProductName()
throws DatabaseException
- Specified by:
getDatabaseProductName
in interface DatabaseConnection
- Throws:
DatabaseException
getDatabaseProductVersion
public java.lang.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 java.lang.String getURL()
- Specified by:
getURL
in interface DatabaseConnection
getConnectionUserName
public java.lang.String getConnectionUserName()
- Specified by:
getConnectionUserName
in interface DatabaseConnection
getWrappedConnection
public java.sql.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 java.sql.Statement createStatement()
throws DatabaseException
- Throws:
DatabaseException
createStatement
public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws DatabaseException
- Throws:
DatabaseException
createStatement
public java.sql.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 java.lang.String getCatalog()
throws DatabaseException
- Specified by:
getCatalog
in interface DatabaseConnection
- Throws:
DatabaseException
getHoldability
public int getHoldability()
throws DatabaseException
- Throws:
DatabaseException
getMetaData
public java.sql.DatabaseMetaData getMetaData()
throws DatabaseException
- Throws:
DatabaseException
getTransactionIsolation
public int getTransactionIsolation()
throws DatabaseException
- Throws:
DatabaseException
getTypeMap
public java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
throws DatabaseException
- Throws:
DatabaseException
getWarnings
public java.sql.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 java.lang.String nativeSQL(java.lang.String sql)
throws DatabaseException
- Specified by:
nativeSQL
in interface DatabaseConnection
- Throws:
DatabaseException
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws DatabaseException
- Throws:
DatabaseException
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws DatabaseException
- Throws:
DatabaseException
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws DatabaseException
- Throws:
DatabaseException
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws DatabaseException
- Throws:
DatabaseException
releaseSavepoint
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws DatabaseException
- Throws:
DatabaseException
rollback
public void rollback()
throws DatabaseException
- Specified by:
rollback
in interface DatabaseConnection
- Throws:
DatabaseException
rollback
public void rollback(java.sql.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(java.lang.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 java.sql.Savepoint setSavepoint()
throws DatabaseException
- Throws:
DatabaseException
setSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws DatabaseException
- Throws:
DatabaseException
setTransactionIsolation
public void setTransactionIsolation(int level)
throws DatabaseException
- Throws:
DatabaseException
setTypeMap
public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)
throws DatabaseException
- Throws:
DatabaseException
getUnderlyingConnection
public java.sql.Connection getUnderlyingConnection()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright © 2010 Liquibase.org. All Rights Reserved.