com.holonplatform.jdbc.spring

## Interface SpringDataSourceConfigProperties

- All Superinterfaces:
    com.holonplatform.core.config.ConfigPropertySet, com.holonplatform.core.datastore.DataContextBound, DataSourceConfigProperties
  All Known Implementing Classes:
    SpringDataSourceConfigProperties.SpringDataSourceConfigPropertiesImpl

      public interface SpringDataSourceConfigProperties
      extends DataSourceConfigProperties

  `DataSourceConfigProperties` extension with additional Spring-related DataSource configuration properties.
  Since:
    5.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `SpringDataSourceConfigProperties.SpringDataSourceConfigPropertiesImpl` Default implementation

    - ### Nested classes/interfaces inherited from interface com.holonplatform.jdbc.DataSourceConfigProperties

      `DataSourceConfigProperties.DataSourceConfigPropertiesImpl`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.config.ConfigPropertySet

      `com.holonplatform.core.config.ConfigPropertySet.Builder<C extends com.holonplatform.core.config.ConfigPropertySet>, com.holonplatform.core.config.ConfigPropertySet.ConfigurationException`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static com.holonplatform.core.config.ConfigProperty<Boolean>` | `CONTINUE_ON_ERROR` Do not stop if an error occurs while initializing the database (default is false)
    `static com.holonplatform.core.config.ConfigProperty<String>` | `DATA_SCRIPT` Data (DML) script resource reference
    `static com.holonplatform.core.config.ConfigProperty<Boolean>` | `INITIALIZE` Populate the database after DataSource initialization using `datacontextid-data-*.sql` scripts.
    `static com.holonplatform.core.config.ConfigProperty<Boolean>` | `PRIMARY` Marks DataSource as primary in multiple data sources environments.
    `static com.holonplatform.core.config.ConfigProperty<String>` | `SCHEMA_SCRIPT` Schema (DDL) script resource reference
    `static com.holonplatform.core.config.ConfigProperty<String>` | `SEPARATOR` Statement separator in SQL initialization scripts.
    `static com.holonplatform.core.config.ConfigProperty<String>` | `SQL_SCRIPT_ENCODING` SQL scripts encoding.

    - ### Fields inherited from interface com.holonplatform.jdbc.DataSourceConfigProperties

      `AUTOCOMMIT, DEFAULT_MAX_POOL_SIZE, DEFAULT_NAME, DRIVER_CLASS_NAME, JNDI_NAME, MAX_POOL_SIZE, MIN_POOL_SIZE, NAME, PASSWORD, PLATFORM, TYPE, URL, USERNAME, VALIDATION_QUERY`

  - ### Method Summary

    All Methods Static Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static com.holonplatform.core.config.ConfigPropertySet.Builder<SpringDataSourceConfigProperties>` | `builder()` Builder to create property set instances bound to a property data source, without data context id specification.
    `static com.holonplatform.core.config.ConfigPropertySet.Builder<SpringDataSourceConfigProperties>` | `builder(String dataContextId)` Builder to create property set instances bound to a property data source.
    `default boolean` | `isContinueOnError()` Gets whether to stop or not if an error occurs while initializing the database.
    `default boolean` | `isInitialize()` Gets whether the DataSource should initialize the database using data scripts
    `default boolean` | `isPrimary()` Gets whether the DataSource should be marked as primary

    - ### Methods inherited from interface com.holonplatform.jdbc.DataSourceConfigProperties

      `getConnectionValidationQuery, getDatabasePlatform, getDriverClassName, isDisableAutoCommit`

    - ### Methods inherited from interface com.holonplatform.core.config.ConfigPropertySet

      `getConfigPropertyValue, getName, getSubPropertiesUsingPrefix, hasConfigProperty`

    - ### Methods inherited from interface com.holonplatform.core.datastore.DataContextBound

      `getDataContextId`

- - ### Field Detail

    - #### PRIMARY

          static final com.holonplatform.core.config.ConfigProperty<Boolean> PRIMARY

      Marks DataSource as primary in multiple data sources environments.

    - #### INITIALIZE

          static final com.holonplatform.core.config.ConfigProperty<Boolean> INITIALIZE

      Populate the database after DataSource initialization using `datacontextid-data-*.sql` scripts.

    - #### SCHEMA_SCRIPT

          static final com.holonplatform.core.config.ConfigProperty<String> SCHEMA_SCRIPT

      Schema (DDL) script resource reference

    - #### DATA_SCRIPT

          static final com.holonplatform.core.config.ConfigProperty<String> DATA_SCRIPT

      Data (DML) script resource reference

    - #### CONTINUE_ON_ERROR

          static final com.holonplatform.core.config.ConfigProperty<Boolean> CONTINUE_ON_ERROR

      Do not stop if an error occurs while initializing the database (default is false)

    - #### SEPARATOR

          static final com.holonplatform.core.config.ConfigProperty<String> SEPARATOR

      Statement separator in SQL initialization scripts. Default is `;`.

    - #### SQL_SCRIPT_ENCODING

          static final com.holonplatform.core.config.ConfigProperty<String> SQL_SCRIPT_ENCODING

      SQL scripts encoding.

  - ### Method Detail

    - #### isPrimary

          default boolean isPrimary()

      Gets whether the DataSource should be marked as primary
      Returns:
        True if primary

    - #### isInitialize

          default boolean isInitialize()

      Gets whether the DataSource should initialize the database using data scripts
      Returns:
        True if initialize

    - #### isContinueOnError

          default boolean isContinueOnError()

      Gets whether to stop or not if an error occurs while initializing the database.
      Returns:
        True to not stop

    - #### builder

          static com.holonplatform.core.config.ConfigPropertySet.Builder<SpringDataSourceConfigProperties> builder(String dataContextId)

      Builder to create property set instances bound to a property data source.
      Specified by:
        `builder` in interface `DataSourceConfigProperties`
      Parameters:
        `dataContextId` - Optional data context id to which DataSource is bound
      Returns:
        ConfigPropertySet builder

    - #### builder

          static com.holonplatform.core.config.ConfigPropertySet.Builder<SpringDataSourceConfigProperties> builder()

      Builder to create property set instances bound to a property data source, without data context id specification.
      Specified by:
        `builder` in interface `DataSourceConfigProperties`
      Returns:
        ConfigPropertySet builder

Copyright © 2017 The Holon Platform. All rights reserved.