|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 |
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 setEnabled(boolean enabled)
enabled
- true if the database populator will be called on startuppublic void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
- in the event of misconfiguration (such
as failure to set an essential property) or if initialization fails.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |