com.holonplatform.datastore.jdbc.context

## Interface JdbcOperationContext

- All Superinterfaces:
    ConnectionHandler, com.holonplatform.core.datastore.DatastoreCommodityHandler, com.holonplatform.core.ExpressionResolver.ExpressionResolverProvider, SQLContext
  All Known Subinterfaces:
    JdbcDatastoreCommodityContext

      public interface JdbcOperationContext
      extends SQLContext, ConnectionHandler, com.holonplatform.core.datastore.DatastoreCommodityHandler

  JDBC datastore operations execution context.
  Since:
    5.1.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `IdentifierResolutionStrategy` | `getIdentifierResolutionStrategy()` Get the `IdentifierResolutionStrategy`.
    `default SQLStatementConfigurator` | `getStatementConfigurator()` Get the `SQLStatementConfigurator`.
    `PreparedStatement` | `prepareInsertStatement(SQLStatement statement, Connection connection, SQLPrimaryKey primaryKey)` Create and configure a `PreparedStatement` for an `INSERT` type operation, using given `SQLStatement` and connection.
    `PreparedStatement` | `prepareStatement(SQLStatement statement, Connection connection)` Create and configure a `PreparedStatement` using given `SQLStatement` and connection.
    `<R> R` | `withSharedConnection(Supplier<R> operations)` Execute given operations using a shared connection.

    - ### Methods inherited from interface com.holonplatform.datastore.jdbc.composer.SQLContext

      `getDialect, getTypeConverter, getValueDeserializer, getValueSerializer, trace`

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

      `getExpressionResolvers`

    - ### Methods inherited from interface com.holonplatform.datastore.jdbc.composer.ConnectionHandler

      `withConnection, withConnection`

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

      `create, getAvailableCommodities, hasCommodity`

- - ### Method Detail

    - #### getIdentifierResolutionStrategy

          IdentifierResolutionStrategy getIdentifierResolutionStrategy()

      Get the `IdentifierResolutionStrategy`.
      Returns:
        the identifier resolution strategy

    - #### withSharedConnection

          <R> R withSharedConnection(Supplier<R> operations)

      Execute given operations using a shared connection.
      Type Parameters:
        `R` - Operation result type
      Parameters:
        `operations` - Operations to execute (not null)
      Returns:
        Operation result

    - #### getStatementConfigurator

          default SQLStatementConfigurator getStatementConfigurator()

      Get the `SQLStatementConfigurator`.
      Returns:
        the `SQLStatementConfigurator`

    - #### prepareStatement

          PreparedStatement prepareStatement(SQLStatement statement,
                                             Connection connection)

      Create and configure a `PreparedStatement` using given `SQLStatement` and connection.
      Parameters:
        `statement` - SQL statement (not null)
        `connection` - Connection (not null)
      Returns:
        The JDBC `PreparedStatement`
      Throws:
        `com.holonplatform.core.exceptions.DataAccessException` - If an error occurred

    - #### prepareInsertStatement

          PreparedStatement prepareInsertStatement(SQLStatement statement,
                                                   Connection connection,
                                                   SQLPrimaryKey primaryKey)

      Create and configure a `PreparedStatement` for an `INSERT` type operation, using given `SQLStatement` and connection.
      Parameters:
        `statement` - SQL statement (not null)
        `connection` - Connection (not null)
        `primaryKey` - Optional primary key to use to retrieve any auto-generated key
      Returns:
        The JDBC `PreparedStatement`
      Throws:
        `com.holonplatform.core.exceptions.DataAccessException` - If an error occurred

Copyright © 2019 The Holon Platform. All rights reserved.