com.holonplatform.datastore.jpa

## Interface JpaDatastore.Builder<D extends JpaDatastore>

- All Superinterfaces:
    com.holonplatform.core.datastore.Datastore.Builder<D,JpaDatastore.Builder<D>>, com.holonplatform.core.ExpressionResolver.ExpressionResolverBuilder<JpaDatastore.Builder<D>>
  Enclosing interface:
    JpaDatastore

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

  `JpaDatastore` builder.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `JpaDatastore.Builder<D>` | `autoFlush(boolean autoFlush)` Set whether to auto-flush mode is enabled.
    `JpaDatastore.Builder<D>` | `entityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)` Set the `EntityManagerFactory` to use to obtain `EntityManager`s used for datastore operations.
    `JpaDatastore.Builder<D>` | `entityManagerFinalizer(JpaDatastore.EntityManagerFinalizer entityManagerFinalizer)` Sets the `EntityManager` finalizer to use after Datastore operations execution.
    `JpaDatastore.Builder<D>` | `entityManagerInitializer(JpaDatastore.EntityManagerInitializer entityManagerInitializer)` Sets the `EntityManager` instance provider for Datastore operations execution.

    - ### 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

    - #### entityManagerFactory

          JpaDatastore.Builder<D> entityManagerFactory(javax.persistence.EntityManagerFactory entityManagerFactory)

      Set the `EntityManagerFactory` to use to obtain `EntityManager`s used for datastore operations.
      Parameters:
        `entityManagerFactory` - The EntityManagerFactory to set (not null)
      Returns:
        this

    - #### entityManagerInitializer

          JpaDatastore.Builder<D> entityManagerInitializer(JpaDatastore.EntityManagerInitializer entityManagerInitializer)

      Sets the `EntityManager` instance provider for Datastore operations execution.
      Parameters:
        `entityManagerInitializer` - the `JpaDatastore.EntityManagerInitializer` to set (not null)
      Returns:
        this

    - #### entityManagerFinalizer

          JpaDatastore.Builder<D> entityManagerFinalizer(JpaDatastore.EntityManagerFinalizer entityManagerFinalizer)

      Sets the `EntityManager` finalizer to use after Datastore operations execution.
      Parameters:
        `entityManagerFinalizer` - the `JpaDatastore.EntityManagerFinalizer` to set
      Returns:
        this

    - #### autoFlush

          JpaDatastore.Builder<D> autoFlush(boolean autoFlush)

      Set whether to auto-flush mode is enabled. When auto-flush mode is enabled, `EntityManager.flush()` is called after each Datastore data manipulation operation, such as `save` or `delete`.

      Default is `false`.

      Parameters:
        `autoFlush` - `true` to enable the auto-flush mode, `false` to disable
      Returns:
        this

Copyright © 2017 The Holon Platform. All rights reserved.