com.holonplatform.datastore.jdbc

## Interface JdbcDatastore.Builder<D extends JdbcDatastore>

- Type Parameters:
    `D` - `JdbcDatastore` type
  All Superinterfaces:
    com.holonplatform.core.datastore.Datastore.Builder<D,JdbcDatastore.Builder<D>>, com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder<JdbcDatastore.Builder<D>>
  Enclosing interface:
    JdbcDatastore

      public static interface JdbcDatastore.Builder<D extends JdbcDatastore>
      extends com.holonplatform.core.datastore.Datastore.Builder<D,JdbcDatastore.Builder<D>>

  `JdbcDatastore` builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `JdbcDatastore.Builder<D>` | `autoCommit(boolean autoCommit)` Set whether the auto-commit mode has to be setted for connections.
    `JdbcDatastore.Builder<D>` | `database(com.holonplatform.jdbc.DatabasePlatform database)` Set the database platform to which the DataSource is connected.
    `JdbcDatastore.Builder<D>` | `dataSource(DataSource dataSource)` Set the `DataSource` to use.
    `JdbcDatastore.Builder<D>` | `dataSource(com.holonplatform.jdbc.DataSourceConfigProperties configuration)` Set the configuration property source to build the `DataSource` to use with the Datastore.
    `JdbcDatastore.Builder<D>` | `dialect(JdbcDialect dialect)` Set the dialect to use.
    `JdbcDatastore.Builder<D>` | `dialect(String dialectClassName)` Set the fully qualified dialect class name to use as datastore dialect.

    - ### Methods inherited from interface com.holonplatform.core.datastore.Datastore.Builder

      `build, configuration, dataContextId, traceEnabled`

    - ### Methods inherited from interface com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder

      `withExpressionResolver`

- - ### Method Detail

    - #### dataSource

          JdbcDatastore.Builder<D> dataSource(DataSource dataSource)

      Set the `DataSource` to use.
      Parameters:
        `dataSource` - DataSource to set (not null)
      Returns:
        this

    - #### dataSource

          JdbcDatastore.Builder<D> dataSource(com.holonplatform.jdbc.DataSourceConfigProperties configuration)

      Set the configuration property source to build the `DataSource` to use with the Datastore.
      Parameters:
        `configuration` - DataSource configuration properties (not null)
      Returns:
        this

    - #### database

          JdbcDatastore.Builder<D> database(com.holonplatform.jdbc.DatabasePlatform database)

      Set the database platform to which the DataSource is connected.

      If `DataSourceConfigProperties` are provided, the database platform is obtained from the `DataSourceConfigProperties.PLATFORM` property or auto-detected by the datastore if the property is not specified.

      Parameters:
        `database` - Database platform to set (not null)
      Returns:
        this

    - #### dialect

          JdbcDatastore.Builder<D> dialect(JdbcDialect dialect)

      Set the dialect to use.

      If a `DatabasePlatform` is provided (using `database(DatabasePlatform)` or read/detected from the DataSource configuration properties with `dataSource(DataSourceConfigProperties)`), the datastore tries to autodetect the dialect to use, if available.

      Parameters:
        `dialect` - The dialect to set (not null)
      Returns:
        this

    - #### dialect

          JdbcDatastore.Builder<D> dialect(String dialectClassName)

      Set the fully qualified dialect class name to use as datastore dialect.

      If a `DatabasePlatform` is provided (using `database(DatabasePlatform)` or read/detected from the DataSource configuration properties with `dataSource(DataSourceConfigProperties)`), the datastore tries to autodetect the dialect to use, if available.

      Parameters:
        `dialectClassName` - The dialect class name to set (not null)
      Returns:
        this

    - #### autoCommit

          JdbcDatastore.Builder<D> autoCommit(boolean autoCommit)

      Set whether the auto-commit mode has to be setted for connections. (default is `true`)
      Parameters:
        `autoCommit` - Whether to set connections auto-commit
      Returns:
        this

Copyright © 2017 The Holon Platform. All rights reserved.