com.holonplatform.datastore.jpa.config

## Interface JpaDatastoreCommodityContext

- All Superinterfaces:
    com.holonplatform.core.datastore.DataContextBound, com.holonplatform.core.datastore.Datastore, com.holonplatform.core.datastore.DatastoreCommodityContext, com.holonplatform.core.datastore.DatastoreCommodityRegistrar<JpaDatastoreCommodityContext>, com.holonplatform.core.ExpressionResolver.ExpressionResolverSupport, JpaDatastore, Serializable

      public interface JpaDatastoreCommodityContext
      extends com.holonplatform.core.datastore.DatastoreCommodityContext, JpaDatastore

  JPA Datastore `DatastoreCommodityContext`.
  Since:
    5.0.0

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.datastore.DatastoreCommodityContext

      `com.holonplatform.core.datastore.DatastoreCommodityContext.CommodityConfigurationException, com.holonplatform.core.datastore.DatastoreCommodityContext.CommodityNotAvailableException`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.datastore.jpa.JpaDatastore

      `JpaDatastore.Builder<D extends JpaDatastore>, JpaDatastore.EntityManagerFinalizer, JpaDatastore.EntityManagerInitializer, JpaDatastore.EntityManagerOperation<R>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.core.datastore.Datastore

      `com.holonplatform.core.datastore.Datastore.OperationResult, com.holonplatform.core.datastore.Datastore.OperationType, com.holonplatform.core.datastore.Datastore.WriteOption`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.datastore.jpa.JpaDatastore

      `QUERY_PARAMETER_LOCK_MODE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.persistence.EntityManager` | `getEntityManager()` Obtain an `EntityManager` instance using configured `EntityManagerInitializer`.
    `javax.persistence.EntityManagerFactory` | `getEntityManagerFactory()` Get the EntityManagerFactory.
    `Optional<ORMPlatform>` | `getORMPlatform()` Get the ORM platform, if detected.
    `boolean` | `isAutoFlush()` Checks whether to auto-flush mode is enabled.
    `boolean` | `isTraceEnabled()` Get whether to trace Datastore operations.

    - ### Methods inherited from interface com.holonplatform.datastore.jpa.JpaDatastore

      `builder, withEntityManager`

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

      `bulkDelete, bulkInsert, bulkUpdate, create, delete, getAvailableCommodities, insert, query, refresh, save, update`

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

      `addExpressionResolver, getExpressionResolvers, removeExpressionResolver`

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

      `getDataContextId`

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

      `getCommodityFactoryType, registerCommodity`

- - ### Method Detail

    - #### getEntityManagerFactory

          javax.persistence.EntityManagerFactory getEntityManagerFactory()

      Get the EntityManagerFactory.
      Returns:
        The EntityManagerFactory

    - #### getEntityManager

          javax.persistence.EntityManager getEntityManager()

      Obtain an `EntityManager` instance using configured `EntityManagerInitializer`.
      Returns:
        A new `EntityManager` instance

    - #### getORMPlatform

          Optional<ORMPlatform> getORMPlatform()

      Get the ORM platform, if detected.
      Returns:
        Optional ORM platform

    - #### isAutoFlush

          boolean isAutoFlush()

      Checks 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`.
      Returns:
        `true` if auto-flush mode is enabled, `false` otherwise

    - #### isTraceEnabled

          boolean isTraceEnabled()

      Get whether to trace Datastore operations.
      Returns:
        the trace `true` if tracing is enabled, `false` otherwise

Copyright © 2017 The Holon Platform. All rights reserved.