parent
0e670b1c15
commit
fb312d0ed5
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2016 the original author or authors.
|
* Copyright 2002-2022 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -35,15 +35,17 @@ public interface DatabasePopulator {
|
||||||
/**
|
/**
|
||||||
* Populate, initialize, or clean up the database using the provided JDBC
|
* Populate, initialize, or clean up the database using the provided JDBC
|
||||||
* connection.
|
* connection.
|
||||||
|
* <p><strong>Warning</strong>: Concrete implementations should not close
|
||||||
|
* the provided {@link Connection}.
|
||||||
* <p>Concrete implementations <em>may</em> throw an {@link SQLException} if
|
* <p>Concrete implementations <em>may</em> throw an {@link SQLException} if
|
||||||
* an error is encountered but are <em>strongly encouraged</em> to throw a
|
* an error is encountered but are <em>strongly encouraged</em> to throw a
|
||||||
* specific {@link ScriptException} instead. For example, Spring's
|
* specific {@link ScriptException} instead. For example, Spring's
|
||||||
* {@link ResourceDatabasePopulator} and {@link DatabasePopulatorUtils} wrap
|
* {@link ResourceDatabasePopulator} and {@link DatabasePopulatorUtils} wrap
|
||||||
* all {@code SQLExceptions} in {@code ScriptExceptions}.
|
* all {@code SQLExceptions} in {@code ScriptExceptions}.
|
||||||
* @param connection the JDBC connection to use to populate the db; already
|
* @param connection the JDBC connection to use; already configured and
|
||||||
* configured and ready to use; never {@code null}
|
* ready to use; never {@code null}
|
||||||
* @throws SQLException if an unrecoverable data access exception occurs
|
* @throws SQLException if an unrecoverable data access exception occurs
|
||||||
* during database population
|
* while interacting with the database
|
||||||
* @throws ScriptException in all other error cases
|
* @throws ScriptException in all other error cases
|
||||||
* @see DatabasePopulatorUtils#execute
|
* @see DatabasePopulatorUtils#execute
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue