Class CompositeDatabasePopulator
java.lang.Object
org.springframework.r2dbc.connection.init.CompositeDatabasePopulator
- All Implemented Interfaces:
- DatabasePopulator
Composite 
DatabasePopulator that delegates to a list of given
DatabasePopulator implementations, executing all scripts.- Since:
- 5.3
- Author:
- Dave Syer, Juergen Hoeller, Sam Brannen, Kazuki Shimizu, Mark Paluch
- 
Constructor SummaryConstructorsConstructorDescriptionCreate an emptyCompositeDatabasePopulator.CompositeDatabasePopulator(Collection<DatabasePopulator> populators) Create aCompositeDatabasePopulator.CompositeDatabasePopulator(DatabasePopulator... populators) Create aCompositeDatabasePopulatorwith the given populators.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddPopulators(DatabasePopulator... populators) Add one or more populators to the list of delegates.reactor.core.publisher.Mono<Void> populate(Connection connection) Populate, initialize, or clean up the database using the provided R2DBCConnection.voidsetPopulators(DatabasePopulator... populators) Specify one or more populators to delegate to.Methods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DatabasePopulatorpopulate
- 
Constructor Details- 
CompositeDatabasePopulatorpublic CompositeDatabasePopulator()Create an emptyCompositeDatabasePopulator.- See Also:
 
- 
CompositeDatabasePopulatorCreate aCompositeDatabasePopulator. with the given populators.- Parameters:
- populators- one or more populators to delegate to.
 
- 
CompositeDatabasePopulatorCreate aCompositeDatabasePopulatorwith the given populators.- Parameters:
- populators- one or more populators to delegate to.
 
 
- 
- 
Method Details- 
setPopulatorsSpecify one or more populators to delegate to.
- 
addPopulatorsAdd one or more populators to the list of delegates.
- 
populateDescription copied from interface:DatabasePopulatorPopulate, initialize, or clean up the database using the provided R2DBCConnection.- Specified by:
- populatein interface- DatabasePopulator
- Parameters:
- connection- the R2DBC connection to use to populate the db; already configured and ready to use, must not be- null
- Returns:
- Monothat initiates script execution and is notified upon completion
- Throws:
- ScriptException- in case of any errors
 
 
-