Interface EntityManagerFactoryRegistry


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.persistence.EntityManagerFactory get​(String reference)
      Retrieve a factory using the default (implementation-dependent) scope.
      javax.persistence.EntityManagerFactory get​(String namespace, String reference)
      Retrieve a factory using the given scope.
      javax.persistence.EntityManagerFactory useDefault()  
    • Method Detail

      • useDefault

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

        javax.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

        javax.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.