Interface EntityManagerFactoryRegistry


public interface EntityManagerFactoryRegistry
An abstract contract allowing to retrieve an entity manager factory.
Author:
Yoann Rodiere
  • Method Summary

    Modifier and Type
    Method
    Description
    jakarta.persistence.EntityManagerFactory
    get(String reference)
    Retrieve a factory using the default (implementation-dependent) scope.
    jakarta.persistence.EntityManagerFactory
    get(String namespace, String reference)
    Retrieve a factory using the given scope.
    jakarta.persistence.EntityManagerFactory
     
  • Method Details

    • useDefault

      jakarta.persistence.EntityManagerFactory useDefault()
      Returns:
      The default EntityManagerFactory, if there is one.
    • get

      jakarta.persistence.EntityManagerFactory get(String reference)
      Retrieve a factory using the default (implementation-dependent) scope.
      Parameters:
      reference - The reference allowing to identify the factory uniquely. Must be non-null and non-empty.
      Returns:
      The EntityManagerFactory for the given reference string.
    • get

      jakarta.persistence.EntityManagerFactory get(String namespace, String reference)
      Retrieve a factory using the given scope.
      Parameters:
      namespace - The namespace of the reference; accepted namespaces are implementation-dependent. Must be non-null and non-empty. For instance an implementation could accept the namespace 'persistence-unit-name', meaning that the reference will be interpreted as a persistence unit name.
      reference - The reference allowing to identify the factory uniquely. Must be non-null and non-empty.
      Returns:
      The EntityManagerFactory for the given reference string.