| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.jdbc.datasource.init.DataSourceInitializer
public class DataSourceInitializer
Used to populate a database during initialization.
DatabasePopulator| Constructor Summary | |
|---|---|
DataSourceInitializer()
 | 
|
| Method Summary | |
|---|---|
 void | 
afterPropertiesSet()
Use the populator to set up data in the data source.  | 
 void | 
destroy()
Use the populator to clean up data in the data source.  | 
 void | 
setDatabaseCleaner(DatabasePopulator databaseCleaner)
Set a script execution to be run in the bean destruction callback, cleaning up the database and leaving it in a known state for others.  | 
 void | 
setDatabasePopulator(DatabasePopulator databasePopulator)
The DatabasePopulator to use to populate the data source. | 
 void | 
setDataSource(DataSource dataSource)
The DataSource to populate when this component is initialized. | 
 void | 
setEnabled(boolean enabled)
Flag to explicitly enable or disable the database populator.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DataSourceInitializer()
| Method Detail | 
|---|
public void setDataSource(DataSource dataSource)
DataSource to populate when this component is initialized.
 Mandatory with no default.
dataSource - the DataSourcepublic void setDatabasePopulator(DatabasePopulator databasePopulator)
DatabasePopulator to use to populate the data source.
 Mandatory with no default.
databasePopulator - the database populator to use.public void setDatabaseCleaner(DatabasePopulator databaseCleaner)
databaseCleaner - the database script executor to run on destroypublic void setEnabled(boolean enabled)
enabled - true if the database populator will be called on startuppublic void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic void destroy()
destroy in interface DisposableBean
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||