com.holonplatform.datastore.jpa

## Interface JpaDatastore.EntityManagerInitializer

- All Known Subinterfaces:
    JpaDatastore.EntityManagerLifecycleHandler, SpringEntityManagerLifecycleHandler
  All Known Implementing Classes:
    DefaultSpringEntityManagerLifecycleHandler
  Enclosing interface:
    JpaDatastore
  Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public static interface JpaDatastore.EntityManagerInitializer

  Interface to provide `EntityManager` instance to use when executing a Datastore operation

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JpaDatastore.EntityManagerInitializer` | `createDefault()` Create a default `JpaDatastore.EntityManagerInitializer`, which uses `EntityManagerFactory.createEntityManager()` to create a new `EntityManager` instance.
    `javax.persistence.EntityManager` | `getEntityManager(javax.persistence.EntityManagerFactory entityManagerFactory)` Get/create the `EntityManager` instance to use when executing a Datastore operation

- - ### Method Detail

    - #### getEntityManager

          javax.persistence.EntityManager getEntityManager(javax.persistence.EntityManagerFactory entityManagerFactory)

      Get/create the `EntityManager` instance to use when executing a Datastore operation
      Parameters:
        `entityManagerFactory` - EntityManagerFactory bound to the Datastore
      Returns:
        EntityManager to use

    - #### createDefault

          static JpaDatastore.EntityManagerInitializer createDefault()

      Create a default `JpaDatastore.EntityManagerInitializer`, which uses `EntityManagerFactory.createEntityManager()` to create a new `EntityManager` instance.
      Returns:
        A default `JpaDatastore.EntityManagerInitializer`

Copyright © 2019 The Holon Platform. All rights reserved.