public class HibernateConnection extends java.lang.Object implements java.sql.Connection
Implements java.sql.Connection in order to pretend a hibernate configuration is a database in order to fit into the Liquibase framework. Beyond standard Connection methods, this class exposes getPrefix(), getPath() and getProperties() to access the setting passed in the JDBC URL.
| Constructor and description |
|---|
HibernateConnection(java.lang.String url, ResourceAccessor resourceAccessor) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
abort(java.util.concurrent.Executor arg0) |
|
public void |
clearWarnings() |
|
public void |
close() |
|
public void |
commit() |
|
public java.sql.Array |
createArrayOf(java.lang.String typeName, java.lang.Object[] elements) |
|
public java.sql.Blob |
createBlob() |
|
public java.sql.Clob |
createClob() |
|
public java.sql.NClob |
createNClob() |
|
public java.sql.SQLXML |
createSQLXML() |
|
public java.sql.Statement |
createStatement() |
|
public java.sql.Statement |
createStatement(int resultSetType, int resultSetConcurrency) |
|
public java.sql.Statement |
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
|
public java.sql.Struct |
createStruct(java.lang.String typeName, java.lang.Object[] attributes) |
|
public boolean |
getAutoCommit() |
|
public java.lang.String |
getCatalog() |
|
public java.lang.String |
getClientInfo(java.lang.String name) |
|
public java.util.Properties |
getClientInfo() |
|
public int |
getHoldability() |
|
public java.sql.DatabaseMetaData |
getMetaData() |
|
public int |
getNetworkTimeout() |
|
public java.lang.String |
getPath()The portion of the url between the path and the query string. |
|
public java.lang.String |
getPrefix()Returns the 'protocol' of the URL. |
|
public java.util.Properties |
getProperties()The set of properties provided by the URL. |
|
public ResourceAccessor |
getResourceAccessor() |
|
public java.lang.String |
getSchema() |
|
public int |
getTransactionIsolation() |
|
public java.util.Map<java.lang.String, java.lang.Class<?>> |
getTypeMap() |
|
public java.lang.String |
getUrl()Returns the entire connection URL |
|
public java.sql.SQLWarning |
getWarnings() |
|
public boolean |
isClosed() |
|
public boolean |
isReadOnly() |
|
public boolean |
isValid(int timeout) |
|
public boolean |
isWrapperFor(java.lang.Class<?> iface) |
|
public java.lang.String |
nativeSQL(java.lang.String sql) |
|
public java.sql.CallableStatement |
prepareCall(java.lang.String sql) |
|
public java.sql.CallableStatement |
prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) |
|
public java.sql.CallableStatement |
prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
|
public java.sql.PreparedStatement |
prepareStatement(java.lang.String sql) |
|
public java.sql.PreparedStatement |
prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) |
|
public java.sql.PreparedStatement |
prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) |
|
public java.sql.PreparedStatement |
prepareStatement(java.lang.String sql, int autoGeneratedKeys) |
|
public java.sql.PreparedStatement |
prepareStatement(java.lang.String sql, int[] columnIndexes) |
|
public java.sql.PreparedStatement |
prepareStatement(java.lang.String sql, java.lang.String[] columnNames) |
|
protected final java.util.Properties |
readProperties(java.lang.String queryString)Creates properties to attach to this connection based on the passed query string. |
|
public void |
releaseSavepoint(java.sql.Savepoint savepoint) |
|
public void |
rollback() |
|
public void |
rollback(java.sql.Savepoint savepoint) |
|
public void |
setAutoCommit(boolean autoCommit) |
|
public void |
setCatalog(java.lang.String catalog) |
|
public void |
setClientInfo(java.lang.String name, java.lang.String value) |
|
public void |
setClientInfo(java.util.Properties properties) |
|
public void |
setHoldability(int holdability) |
|
public void |
setNetworkTimeout(java.util.concurrent.Executor arg0, int arg1) |
|
public void |
setReadOnly(boolean readOnly) |
|
public java.sql.Savepoint |
setSavepoint() |
|
public java.sql.Savepoint |
setSavepoint(java.lang.String name) |
|
public void |
setSchema(java.lang.String arg0) |
|
public void |
setTransactionIsolation(int level) |
|
public void |
setTypeMap(java.util.Map<java.lang.String, java.lang.Class<?>> map) |
<T> |
public T |
unwrap(java.lang.Class<T> iface) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
The portion of the url between the path and the query string. Normally a filename or a class name.
Returns the 'protocol' of the URL. For example, "hibernate:classic" or "hibernate:ejb3"
The set of properties provided by the URL. Eg:
hibernate:classic:/path/to/hibernate.cfg.xml?foo=bar
This will have a property called 'foo' with a value of 'bar'.
Returns the entire connection URL
Creates properties to attach to this connection based on the passed query string.