Package com.minlessika.db
Class DatabaseLiquibaseUpdate
- java.lang.Object
-
- com.minlessika.db.WrapDatabase
-
- com.minlessika.db.DatabaseLiquibaseUpdate
-
- All Implemented Interfaces:
Database,Wrapper,CommonDataSource,DataSource
public final class DatabaseLiquibaseUpdate extends WrapDatabase implements Database
Database decorator to apply database schema updates from liquibase files at starting- Author:
- Olivier B. OURA (baudolivier.oura@gmail.com)
-
-
Field Summary
-
Fields inherited from class com.minlessika.db.WrapDatabase
origin
-
-
Constructor Summary
Constructors Constructor Description DatabaseLiquibaseUpdate(Database origin, String changeLogRelativePath)Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectiongetConnection(String username, String password)intgetLoginTimeout()PrintWritergetLogWriter()LoggergetParentLogger()booleanisWrapperFor(Class<?> iface)voidsetLoginTimeout(int seconds)voidsetLogWriter(PrintWriter out)voidstart()Start database.<T> Tunwrap(Class<T> iface)-
Methods inherited from class com.minlessika.db.WrapDatabase
commit, getConnection, rollback, startTransaction, terminateTransaction, transactionStarted
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface com.minlessika.db.Database
commit, rollback, startTransaction, terminateTransaction, transactionStarted
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder, getConnection
-
-
-
-
Method Detail
-
start
public void start()
Description copied from interface:DatabaseStart database. place to do some initializations- Specified by:
startin interfaceDatabase- Overrides:
startin classWrapDatabase
-
getLogWriter
public PrintWriter getLogWriter() throws SQLException
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Overrides:
getLogWriterin classWrapDatabase- Throws:
SQLException
-
setLogWriter
public void setLogWriter(PrintWriter out) throws SQLException
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Overrides:
setLogWriterin classWrapDatabase- Throws:
SQLException
-
setLoginTimeout
public void setLoginTimeout(int seconds) throws SQLException- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Overrides:
setLoginTimeoutin classWrapDatabase- Throws:
SQLException
-
getLoginTimeout
public int getLoginTimeout() throws SQLException- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Overrides:
getLoginTimeoutin classWrapDatabase- Throws:
SQLException
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceCommonDataSource- Overrides:
getParentLoggerin classWrapDatabase- Throws:
SQLFeatureNotSupportedException
-
unwrap
public <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Overrides:
unwrapin classWrapDatabase- Throws:
SQLException
-
isWrapperFor
public boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Overrides:
isWrapperForin classWrapDatabase- Throws:
SQLException
-
getConnection
public Connection getConnection(String username, String password) throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Overrides:
getConnectionin classWrapDatabase- Throws:
SQLException
-
-