com.holonplatform.datastore.jdbc.internal

## Class DefaultJdbcDatastore.AbstractBuilder<D extends JdbcDatastore,I extends DefaultJdbcDatastore>

- java.lang.Object
- - com.holonplatform.datastore.jdbc.internal.DefaultJdbcDatastore.AbstractBuilder<D,I>

- Type Parameters:
    `D` - Concrete JdbcDatastore type
    `I` - Concrete datastore instance
  All Implemented Interfaces:
    com.holonplatform.core.datastore.DatastoreOperations.Builder<D,JdbcDatastore.Builder<D>>, com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder<JdbcDatastore.Builder<D>>, JdbcDatastore.Builder<D>
  Direct Known Subclasses:
    DefaultJdbcDatastore.DefaultBuilder
  Enclosing class:
    DefaultJdbcDatastore

      public abstract static class DefaultJdbcDatastore.AbstractBuilder<D extends JdbcDatastore,I extends DefaultJdbcDatastore>
      extends Object
      implements JdbcDatastore.Builder<D>

  Base `JdbcDatastore` builder.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractBuilder(I datastore)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `JdbcDatastore.Builder<D>` | `autoCommit(boolean autoCommit)` Deprecated.
    `JdbcDatastore.Builder<D>` | `configuration(com.holonplatform.core.datastore.DatastoreConfigProperties configuration)`
    `JdbcDatastore.Builder<D>` | `connectionHandler(com.holonplatform.jdbc.JdbcConnectionHandler connectionHandler)` Set a custom `JdbcConnectionHandler` to be used for Datastore JDBC connections handling.
    `JdbcDatastore.Builder<D>` | `database(com.holonplatform.jdbc.DatabasePlatform database)` Set the database platform to which the DataSource is connected.
    `JdbcDatastore.Builder<D>` | `dataContextId(String dataContextId)`
    `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(SQLDialect dialect)` Set the dialect to use.
    `JdbcDatastore.Builder<D>` | `dialect(String dialectClassName)` Set the fully qualified dialect class name to use as datastore dialect.
    `JdbcDatastore.Builder<D>` | `identifierResolutionStrategy(IdentifierResolutionStrategy identifierResolutionStrategy)` Set the `IdentifierResolutionStrategy`.
    `JdbcDatastore.Builder<D>` | `traceEnabled(boolean trace)`
    `JdbcDatastore.Builder<D>` | `transactionFactory(JdbcTransactionFactory transactionFactory)` Set a custom `JdbcTransactionFactory` to be used by the Datastore to create new transactions.
    `<C extends com.holonplatform.core.datastore.DatastoreCommodity> JdbcDatastore.Builder<D>` | `withCommodity(JdbcDatastoreCommodityFactory<C> commodityFactory)` Register a `JdbcDatastoreCommodityFactory`.
    `<E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression> JdbcDatastore.Builder<D>` | `withExpressionResolver(com.holonplatform.core.ExpressionResolver<E,R> expressionResolver)`

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

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

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

      `build`

- - ### Constructor Detail

    - #### AbstractBuilder

          public AbstractBuilder(I datastore)

  - ### Method Detail

    - #### dataContextId

          public JdbcDatastore.Builder<D> dataContextId(String dataContextId)

      Specified by:
        `dataContextId` in interface `com.holonplatform.core.datastore.DatastoreOperations.Builder<D extends JdbcDatastore,JdbcDatastore.Builder<D extends JdbcDatastore>>`

    - #### traceEnabled

          public JdbcDatastore.Builder<D> traceEnabled(boolean trace)

      Specified by:
        `traceEnabled` in interface `com.holonplatform.core.datastore.DatastoreOperations.Builder<D extends JdbcDatastore,JdbcDatastore.Builder<D extends JdbcDatastore>>`

    - #### withExpressionResolver

          public <E extends com.holonplatform.core.Expression,R extends com.holonplatform.core.Expression> JdbcDatastore.Builder<D> withExpressionResolver(com.holonplatform.core.ExpressionResolver<E,R> expressionResolver)

      Specified by:
        `withExpressionResolver` in interface `com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder<JdbcDatastore.Builder<D extends JdbcDatastore>>`

    - #### dataSource

          public JdbcDatastore.Builder<D> dataSource(DataSource dataSource)

      Description copied from interface: `JdbcDatastore.Builder`
      Set the `DataSource` to use.
      Specified by:
        `dataSource` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `dataSource` - DataSource to set (not null)
      Returns:
        this

    - #### dataSource

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

      Description copied from interface: `JdbcDatastore.Builder`
      Set the configuration property source to build the `DataSource` to use with the Datastore.
      Specified by:
        `dataSource` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `configuration` - DataSource configuration properties (not null)
      Returns:
        this

    - #### database

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

      Description copied from interface: `JdbcDatastore.Builder`
      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.

      Specified by:
        `database` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `database` - Database platform to set (not null)
      Returns:
        this

    - #### dialect

          public JdbcDatastore.Builder<D> dialect(SQLDialect dialect)

      Description copied from interface: `JdbcDatastore.Builder`
      Set the dialect to use.

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

      Specified by:
        `dialect` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `dialect` - The dialect to set (not null)
      Returns:
        this

    - #### dialect

          public JdbcDatastore.Builder<D> dialect(String dialectClassName)

      Description copied from interface: `JdbcDatastore.Builder`
      Set the fully qualified dialect class name to use as datastore dialect.

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

      Specified by:
        `dialect` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `dialectClassName` - The dialect class name to set (not null)
      Returns:
        this

    - #### autoCommit

          @Deprecated
          public JdbcDatastore.Builder<D> autoCommit(boolean autoCommit)

      Deprecated.
      Description copied from interface: `JdbcDatastore.Builder`
      Set whether the auto-commit mode has to be setted for connections. (default is `true`)
      Specified by:
        `autoCommit` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `autoCommit` - Whether to set connections auto-commit
      Returns:
        this

    - #### connectionHandler

          public JdbcDatastore.Builder<D> connectionHandler(com.holonplatform.jdbc.JdbcConnectionHandler connectionHandler)

      Description copied from interface: `JdbcDatastore.Builder`
      Set a custom `JdbcConnectionHandler` to be used for Datastore JDBC connections handling.
      Specified by:
        `connectionHandler` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `connectionHandler` - The connection handler to set (not null)
      Returns:
        this

    - #### transactionFactory

          public JdbcDatastore.Builder<D> transactionFactory(JdbcTransactionFactory transactionFactory)

      Description copied from interface: `JdbcDatastore.Builder`
      Set a custom `JdbcTransactionFactory` to be used by the Datastore to create new transactions.
      Specified by:
        `transactionFactory` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `transactionFactory` - The transaction factory to set (not null)
      Returns:
        this

    - #### identifierResolutionStrategy

          public JdbcDatastore.Builder<D> identifierResolutionStrategy(IdentifierResolutionStrategy identifierResolutionStrategy)

      Description copied from interface: `JdbcDatastore.Builder`
      Set the `IdentifierResolutionStrategy`.

      The identifier resolution strategy is used by the datastore to perform operations which involve a `PropertyBox` and for which the `PropertyBox` identifier properties are required to match the `PropertyBox` data with the database table primary key.

      Specified by:
        `identifierResolutionStrategy` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Parameters:
        `identifierResolutionStrategy` - The identifier resolution strategy to set (not null)
      Returns:
        this

    - #### withCommodity

          public <C extends com.holonplatform.core.datastore.DatastoreCommodity> JdbcDatastore.Builder<D> withCommodity(JdbcDatastoreCommodityFactory<C> commodityFactory)

      Description copied from interface: `JdbcDatastore.Builder`
      Register a `JdbcDatastoreCommodityFactory`.
      Specified by:
        `withCommodity` in interface `JdbcDatastore.Builder<D extends JdbcDatastore>`
      Type Parameters:
        `C` - Commodity type
      Parameters:
        `commodityFactory` - The factory to register (not null)
      Returns:
        this

    - #### configuration

          public JdbcDatastore.Builder<D> configuration(com.holonplatform.core.datastore.DatastoreConfigProperties configuration)

      Specified by:
        `configuration` in interface `com.holonplatform.core.datastore.DatastoreOperations.Builder<D extends JdbcDatastore,JdbcDatastore.Builder<D extends JdbcDatastore>>`

Copyright © 2019 The Holon Platform. All rights reserved.