com.holonplatform.datastore.jpa.context

## Interface JpaContext

- All Superinterfaces:
    com.holonplatform.core.ExpressionResolver.ExpressionResolverProvider
  All Known Subinterfaces:
    JpaDatastoreCommodityContext, JpaExecutionContext, JpaOperationContext, JPQLResolutionContext, JPQLStatementResolutionContext
  All Known Implementing Classes:
    DefaultJpaDatastore

      public interface JpaContext
      extends com.holonplatform.core.ExpressionResolver.ExpressionResolverProvider

  Base JPA context.
  Since:
    5.1.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `ORMDialect` | `getDialect()` Get the `ORMDialect` to use.
    `javax.persistence.EntityManagerFactory` | `getEntityManagerFactory()` Get the EntityManagerFactory.
    `Optional<ORMPlatform>` | `getORMPlatform()` Get the ORM platform, if detected.
    `default JPQLValueDeserializer` | `getValueDeserializer()` Get the `JPQLValueDeserializer` of this context.
    `default JPQLValueSerializer` | `getValueSerializer()` Get the `JPQLValueSerializer` of this context.
    `void` | `trace(String jpql)` Trace given JPQL statement.
    `void` | `traceOperation(String operation)` Trace given JPA operation.

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

      `getExpressionResolvers`

- - ### Method Detail

    - #### getEntityManagerFactory

          javax.persistence.EntityManagerFactory getEntityManagerFactory()

      Get the EntityManagerFactory.
      Returns:
        The EntityManagerFactory

    - #### getDialect

          ORMDialect getDialect()

      Get the `ORMDialect` to use.
      Returns:
        The ORM dialect

    - #### getORMPlatform

          Optional<ORMPlatform> getORMPlatform()

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

    - #### getValueSerializer

          default JPQLValueSerializer getValueSerializer()

      Get the `JPQLValueSerializer` of this context.
      Returns:
        the `JPQLValueSerializer`

    - #### getValueDeserializer

          default JPQLValueDeserializer getValueDeserializer()

      Get the `JPQLValueDeserializer` of this context.
      Returns:
        the `JPQLValueDeserializer`

    - #### trace

          void trace(String jpql)

      Trace given JPQL statement.

      If tracing is enabled, the JPQL statement is logged using the `INFO` level, otherwise it is logged using the `DEBUG` level.

      Parameters:
        `jpql` - JPQL to trace

    - #### traceOperation

          void traceOperation(String operation)

      Trace given JPA operation.

      If tracing is enabled, the operation is logged using the `INFO` level, otherwise it is logged using the `DEBUG` level.

      Parameters:
        `operation` - Operation to trace

Copyright © 2019 The Holon Platform. All rights reserved.