com.holonplatform.jdbc.internal

## Class DataSourceInitializer

- java.lang.Object
- - com.holonplatform.jdbc.internal.DataSourceInitializer

-     public final class DataSourceInitializer
      extends Object

  Helper class to initialize a `DataSource` using SQL init scripts.
  Since:
    5.1.0

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `initDataSourceFromSQL(DataSource dataSource, List<String> sqlScripts)` Init given `DataSource` using provided SQL scripts.
    `static void` | `initDataSourceFromSQL(DataSource dataSource, String... sqlScripts)` Init given `DataSource` using provided SQL scripts.
    `static void` | `initDataSourceFromSQLResources(DataSource dataSource, List<String> scriptResourceNames)` Init given `DataSource` using provided SQL scripts resource names.
    `static void` | `initDataSourceFromSQLResources(DataSource dataSource, String... scriptResourceNames)` Init given `DataSource` using provided SQL scripts resource names.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### initDataSourceFromSQL

          public static void initDataSourceFromSQL(DataSource dataSource,
                                                   String... sqlScripts)
                                            throws DataSourceInitializationException

      Init given `DataSource` using provided SQL scripts.
      Parameters:
        `dataSource` - The DataSource to init
        `sqlScripts` - SQL scripts
      Throws:
        `DataSourceInitializationException` - If an error occurred

    - #### initDataSourceFromSQL

          public static void initDataSourceFromSQL(DataSource dataSource,
                                                   List<String> sqlScripts)
                                            throws DataSourceInitializationException

      Init given `DataSource` using provided SQL scripts.
      Parameters:
        `dataSource` - The DataSource to init
        `sqlScripts` - SQL scripts
      Throws:
        `DataSourceInitializationException` - If an error occurred

    - #### initDataSourceFromSQLResources

          public static void initDataSourceFromSQLResources(DataSource dataSource,
                                                            String... scriptResourceNames)
                                                     throws DataSourceInitializationException

      Init given `DataSource` using provided SQL scripts resource names.
      Parameters:
        `dataSource` - The DataSource to init
        `scriptResourceNames` - SQL scripts resource names
      Throws:
        `DataSourceInitializationException` - If an error occurred

    - #### initDataSourceFromSQLResources

          public static void initDataSourceFromSQLResources(DataSource dataSource,
                                                            List<String> scriptResourceNames)
                                                     throws DataSourceInitializationException

      Init given `DataSource` using provided SQL scripts resource names.
      Parameters:
        `dataSource` - The DataSource to init
        `scriptResourceNames` - SQL scripts resource names
      Throws:
        `DataSourceInitializationException` - If an error occurred

Copyright © 2019 The Holon Platform. All rights reserved.