public abstract class AbstractScriptDatabaseInitializer
extends java.lang.Object
implements org.springframework.context.ResourceLoaderAware, org.springframework.beans.factory.InitializingBean
InitializingBean that performs SQL database initialization
 using schema (DDL) and data (DML) scripts.| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractScriptDatabaseInitializer(DatabaseInitializationSettings settings)Creates a new  AbstractScriptDatabaseInitializerthat will initialize the
 database using the given settings. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet() | 
| boolean | initializeDatabase()Initializes the database by applying schema and data scripts. | 
| protected boolean | isEmbeddedDatabase()Returns whether the database that is to be initialized is embedded. | 
| protected abstract void | runScripts(java.util.List<org.springframework.core.io.Resource> resources,
          boolean continueOnError,
          java.lang.String separator,
          java.nio.charset.Charset encoding) | 
| void | setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) | 
protected AbstractScriptDatabaseInitializer(DatabaseInitializationSettings settings)
AbstractScriptDatabaseInitializer that will initialize the
 database using the given settings.settings - initialization settingspublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwarepublic void afterPropertiesSet()
                        throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic boolean initializeDatabase()
true if one or more scripts were applied to the database, otherwise
 falseprotected boolean isEmbeddedDatabase()
true if the database is embedded, otherwise falseprotected abstract void runScripts(java.util.List<org.springframework.core.io.Resource> resources,
                                   boolean continueOnError,
                                   java.lang.String separator,
                                   java.nio.charset.Charset encoding)