Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.datasource.init
Class CompositeDatabasePopulator

    java.lang.Object
      org.springframework.jdbc.datasource.init.CompositeDatabasePopulator

All Implemented Interfaces:
  DatabasePopulator

    public class CompositeDatabasePopulator

extends java.lang.Object
implements DatabasePopulator

`DatabasePopulator` implementation that delegates to a list of other DatabasePopulator implementations, executing all scripts.

Since:
  3.1
Author:
  Dave Syer, Juergen Hoeller

Constructor Summary
`CompositeDatabasePopulator()`

Method Summary
`void` | `addPopulators(DatabasePopulator... populators)` Add a populator to the list of delegates.
`void` | `populate(java.sql.Connection connection)` Populate the database using the JDBC connection provided.
`void` | `setPopulators(DatabasePopulator... populators)` Specify a list of populators to delegate to.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CompositeDatabasePopulator

    public CompositeDatabasePopulator()

Method Detail

### setPopulators

    public void setPopulators(DatabasePopulator... populators)

  Specify a list of populators to delegate to.

### addPopulators

    public void addPopulators(DatabasePopulator... populators)

  Add a populator to the list of delegates.

### populate

    public void populate(java.sql.Connection connection)
                  throws java.sql.SQLException

  Description copied from interface: `DatabasePopulator`
  Populate the database using the JDBC connection provided.

  Specified by:
    `populate` in interface `DatabasePopulator`
  Parameters:
    `connection` - the JDBC connection to use to populate the db; already configured and ready to use
  Throws:
    `java.sql.SQLException` - if an unrecoverable data access exception occurs during database population

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD