Interface EntityManagerFactoryRegistry
public interface EntityManagerFactoryRegistry
An abstract contract allowing to retrieve an entity manager factory.
- Author:
- Yoann Rodiere
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManagerFactoryRetrieve a factory using the default (implementation-dependent) scope.jakarta.persistence.EntityManagerFactoryRetrieve 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
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
EntityManagerFactoryfor the given reference string.
-
get
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
EntityManagerFactoryfor the given reference string.
-