|
|||||||||
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
Field Summary | |
---|---|
private DatabasePopulator |
databasePopulator
|
private javax.sql.DataSource |
dataSource
|
private boolean |
enabled
|
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(javax.sql.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 |
Field Detail |
---|
private javax.sql.DataSource dataSource
private DatabasePopulator databasePopulator
private boolean enabled
Constructor Detail |
---|
public DataSourceInitializer()
Method Detail |
---|
public void setDataSource(javax.sql.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 java.lang.Exception
afterPropertiesSet
in interface InitializingBean
java.lang.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 |