javax.persistence.spi.PersistenceProvider - JPA interface
javax.persistence.spi
Interface PersistenceProvider
It is invoked by the container in Java EE environments and by the javax.persistence.Persistence
class in Java SE environments to create an javax.persistence.EntityManagerFactory
.
- Since:
- JPA 1.0
EntityManagerFactory
is to be created. - Parameters:
-
info
- metadata for use by the persistence provider -
map
- a Map of integration-level properties for use by the persistence provider (may be null if no properties are specified). If a Bean Validation provider is present in the classpath, the container must pass theValidatorFactory
instance in the map with the key"javax.persistence.validation.factory"
.
- Returns:
- EntityManagerFactory for the persistence unit specified by the metadata
- Since:
- JPA 1.0
Persistence
class when an EntityManagerFactory
is to be created. - Parameters:
-
emName
- the name of the persistence unit -
map
- a Map of properties for use by the persistence provider. These properties may be used to override the values of the corresponding elements in thepersistence.xml
file or specify values for properties not specified in thepersistence.xml
(and may be null if no properties are specified).
- Returns:
- EntityManagerFactory for the persistence unit, or null if the provider is not the right provider
- Since:
- JPA 1.0
- Returns:
- ProviderUtil interface
- Since:
- JPA 2.0