org.dellroad.stuff.schema
Class SchemaUpdatingDataSource
java.lang.Object
org.dellroad.stuff.schema.AbstractUpdatingDataSource
org.dellroad.stuff.schema.SchemaUpdatingDataSource
- All Implemented Interfaces:
- Wrapper, CommonDataSource, DataSource
public class SchemaUpdatingDataSource
- extends AbstractUpdatingDataSource
A DataSource that wraps an inner DataSource and automatically intializes and updates
the database schema using a SQLSchemaUpdater on first access.
- See Also:
SQLSchemaUpdater
| Methods inherited from class org.dellroad.stuff.schema.AbstractUpdatingDataSource |
getConnection, getConnection, getInnerDataSource, getLoginTimeout, getLogWriter, isUpdated, isWrapperFor, setDataSource, setLoginTimeout, setLogWriter, unwrap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchemaUpdatingDataSource
public SchemaUpdatingDataSource()
setSchemaUpdater
public void setSchemaUpdater(SQLSchemaUpdater schemaUpdater)
- Configure the
SQLSchemaUpdater that will initialize and update the database. Required property.
updateDataSource
protected void updateDataSource(DataSource dataSource)
throws SQLException
- Description copied from class:
AbstractUpdatingDataSource
- Update the inner
DataSource.
This method will be invoked at most once.
- Specified by:
updateDataSource in class AbstractUpdatingDataSource
- Throws:
SQLException