FileDocCategorySizeDatePackage
PersistenceProvider.javaAPI DocGlassfish v2 API3786Fri May 04 22:34:08 BST 2007javax.persistence.spi

PersistenceProvider

public interface PersistenceProvider
Interface implemented by a persistence provider. The implementation of this interface that is to be used for a given {@link javax.persistence.EntityManager} is specified in persistence.xml file in the persistence archive. This interface is invoked by the Container when it needs to create an {@link javax.persistence.EntityManagerFactory}, or by the Persistence class when running outside the Container.
since
Java Persistence 1.0

Fields Summary
Constructors Summary
Methods Summary
public javax.persistence.EntityManagerFactorycreateContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo info, java.util.Map map)
Called by the container when an {@link javax.persistence.EntityManagerFactory} is to be created.

param
info Metadata for use by the persistence provider
param
map A Map of integration-level properties for use by the persistence provider. Can be null if there is no integration-level property.
return
EntityManagerFactory for the persistence unit specified by the metadata

public javax.persistence.EntityManagerFactorycreateEntityManagerFactory(java.lang.String emName, java.util.Map map)
Called by Persistence class when an {@link javax.persistence.EntityManagerFactory} is to be created.

param
emName The name of the persistence unit
param
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 the persistence.xml file or specify values for properties not specified in the persistence.xml.
return
EntityManagerFactory for the persistence unit, or null if the provider is not the right provider