Polishing

This commit is contained in:
Sam Brannen
2014-03-16 17:34:01 +01:00
parent bb67cd4657
commit cae50c3a2d
5 changed files with 45 additions and 42 deletions

View File

@@ -62,14 +62,25 @@ public class ResourceDatabasePopulator implements DatabasePopulator {
/**
* Construct a new {@code ResourceDatabasePopulator} with default settings.
* @since 4.0.3
*/
public ResourceDatabasePopulator() {
/* no-op */
}
/**
* Construct a new {@code ResourceDatabasePopulator} with default settings
* for the supplied scripts.
* @param scripts the scripts to execute to populate the database
* @since 4.0.3
*/
public ResourceDatabasePopulator(Resource... scripts) {
this();
this.scripts = Arrays.asList(scripts);
}
/**
* Construct a new {@code ResourceDatabasePopulator} with the supplied values.
*
* @param continueOnError flag to indicate that all failures in SQL should be
* logged but not cause a failure
* @param ignoreFailedDrops flag to indicate that a failed SQL {@code DROP}
@@ -77,13 +88,14 @@ public class ResourceDatabasePopulator implements DatabasePopulator {
* @param sqlScriptEncoding the encoding for the supplied SQL scripts, if
* different from the platform encoding; may be {@code null}
* @param scripts the scripts to execute to populate the database
* @since 4.0.3
*/
public ResourceDatabasePopulator(boolean continueOnError, boolean ignoreFailedDrops, String sqlScriptEncoding,
Resource... scripts) {
this(scripts);
this.continueOnError = continueOnError;
this.ignoreFailedDrops = ignoreFailedDrops;
this.sqlScriptEncoding = sqlScriptEncoding;
this.scripts = Arrays.asList(scripts);
}
/**

View File

@@ -1,8 +1,6 @@
/**
*
* Provides extensible support for initializing databases through scripts.
*
*/
package org.springframework.jdbc.datasource.init;