org.datanucleus.jpa
Class PersistenceProviderImpl

java.lang.Object
  extended by org.datanucleus.jpa.PersistenceProviderImpl
All Implemented Interfaces:
javax.persistence.spi.PersistenceProvider

public class PersistenceProviderImpl
extends java.lang.Object
implements javax.persistence.spi.PersistenceProvider

PersistenceProvider implementation. Provides a means of creating EntityManagerFactory objects.

Version:
$Revision: 1.1 $

Constructor Summary
PersistenceProviderImpl()
          Constructor.
 
Method Summary
 javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo unitInfo, java.util.Map properties)
          Method to create an EntityManagerFactory when running in J2EE.
 javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String unitName, java.util.Map properties)
          Method to create an EntityManagerFactory when running in J2SE.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceProviderImpl

public PersistenceProviderImpl()
Constructor.

Method Detail

createContainerEntityManagerFactory

public javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo unitInfo,
                                                                                  java.util.Map properties)
Method to create an EntityManagerFactory when running in J2EE. The container will have parsed the persistence.xml files to provide this PersistenceUnitInfo.

Specified by:
createContainerEntityManagerFactory in interface javax.persistence.spi.PersistenceProvider
Parameters:
unitInfo - The "persistence-unit"
properties - EntityManagerFactory properties to override those in the persistence unit
Returns:
The EntityManagerFactory

createEntityManagerFactory

public javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String unitName,
                                                                         java.util.Map properties)
Method to create an EntityManagerFactory when running in J2SE.

Specified by:
createEntityManagerFactory in interface javax.persistence.spi.PersistenceProvider
Parameters:
unitName - Name of the "persistence-unit"
properties - EntityManagerFactory properties to override those in the persistence unit
Returns:
The EntityManagerFactory


Copyright © 2009. All Rights Reserved.