EclipseLink 1.0_1.0 M7 - 20080508 API Reference - Incubation

org.eclipse.persistence.jpa.osgi
Class PersistenceProvider

java.lang.Object
  extended by org.eclipse.persistence.jpa.osgi.PersistenceProvider
All Implemented Interfaces:
javax.persistence.spi.PersistenceProvider, org.eclipse.persistence.internal.jpa.PersistenceInitializationActivator

public class PersistenceProvider
extends java.lang.Object
implements javax.persistence.spi.PersistenceProvider, org.eclipse.persistence.internal.jpa.PersistenceInitializationActivator

EclipseLink JPA provider within OSGi


Constructor Summary
PersistenceProvider()
           
 
Method Summary
static void addBundle(Bundle bundle, java.lang.String[] persistenceUnitNames)
           
 javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo info, java.util.Map map)
           
 javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String emName, java.util.Map properties)
          Called by Persistence class when an EntityManagerFactory is to be created.
 javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String emName, java.util.Map properties, java.lang.ClassLoader classLoader)
           
static java.lang.ClassLoader getBundleClassLoader(Bundle bundle)
           
 boolean isPersistenceProviderSupported(java.lang.String providerClassName)
          Returns whether the given persistence provider class is supported by this implementation
static void removeBundle(Bundle bundle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistenceProvider

public PersistenceProvider()
Method Detail

addBundle

public static void addBundle(Bundle bundle,
                             java.lang.String[] persistenceUnitNames)

removeBundle

public static void removeBundle(Bundle bundle)

createEntityManagerFactory

public javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String emName,
                                                                         java.util.Map properties)
Called by Persistence class when an EntityManagerFactory is to be created.

Specified by:
createEntityManagerFactory in interface javax.persistence.spi.PersistenceProvider
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 the persistence.xml file or specify values for properties not specified in the persistence.xml.
Returns:
EntityManagerFactory for the persistence unit, or null if the provider is not the right provider

createEntityManagerFactory

public javax.persistence.EntityManagerFactory createEntityManagerFactory(java.lang.String emName,
                                                                         java.util.Map properties,
                                                                         java.lang.ClassLoader classLoader)
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 the persistence.xml file or specify values for properties not specified in the persistence.xml.
classloader - The ClassLoader to use to obtain all entity classes and resources.
Returns:
EntityManagerFactory for the persistence unit, or null if the provider is not the right provider

getBundleClassLoader

public static java.lang.ClassLoader getBundleClassLoader(Bundle bundle)

isPersistenceProviderSupported

public boolean isPersistenceProviderSupported(java.lang.String providerClassName)
Returns whether the given persistence provider class is supported by this implementation

Specified by:
isPersistenceProviderSupported in interface org.eclipse.persistence.internal.jpa.PersistenceInitializationActivator
Parameters:
providerClassName -
Returns:

createContainerEntityManagerFactory

public javax.persistence.EntityManagerFactory createContainerEntityManagerFactory(javax.persistence.spi.PersistenceUnitInfo info,
                                                                                  java.util.Map map)
Specified by:
createContainerEntityManagerFactory in interface javax.persistence.spi.PersistenceProvider

EclipseLink 1.0_1.0 M7 - 20080508 API Reference - Incubation