|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.persistence.Persistence
public class Persistence
Bootstrap class that is used to obtain an EntityManagerFactory
.
Nested Class Summary | |
---|---|
static class |
Persistence.DefaultProviderResolver
Default provider resolver class to use when none is explicitly set. |
static interface |
Persistence.ProviderResolver
Interface used by the Persistence class to obtain all available persistence providers. |
Field Summary | |
---|---|
protected static Persistence.ProviderResolver |
providerResolver
|
protected static java.util.Set<PersistenceProvider> |
providers
|
Constructor Summary | |
---|---|
Persistence()
|
Method Summary | |
---|---|
static void |
addProvider(PersistenceProvider provider)
Dynamically add a provider to the set of available providers. |
static EntityManagerFactory |
createEntityManagerFactory(java.lang.String persistenceUnitName)
Create and return an EntityManagerFactory for the named persistence unit. |
static EntityManagerFactory |
createEntityManagerFactory(java.lang.String persistenceUnitName,
java.util.Map properties)
Create and return an EntityManagerFactory for the named persistence unit using the given properties. |
static Persistence.ProviderResolver |
getProviderResolver()
Get the resolver being used to obtain the available providers. |
static void |
removeProvider(java.lang.String providerName)
Dynamically remove a named provider from the set of available providers. |
static void |
resetProviders()
Reinitialize to have no providers. |
static void |
setProviderResolver(Persistence.ProviderResolver resolver)
Set the resolver to an alternate provider resolution strategy (implemented externally). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.util.Set<PersistenceProvider> providers
protected static Persistence.ProviderResolver providerResolver
Constructor Detail |
---|
public Persistence()
Method Detail |
---|
public static Persistence.ProviderResolver getProviderResolver()
public static void setProviderResolver(Persistence.ProviderResolver resolver)
resolver
- The resolver to use when obtaining all available providerspublic static EntityManagerFactory createEntityManagerFactory(java.lang.String persistenceUnitName)
persistenceUnitName
- The name of the persistence unit
public static EntityManagerFactory createEntityManagerFactory(java.lang.String persistenceUnitName, java.util.Map properties)
persistenceUnitName
- The name of the persistence unitproperties
- Additional properties to use when creating the
factory. The values of these properties override any values
that may have been configured elsewhere.
public static void addProvider(PersistenceProvider provider)
public static void removeProvider(java.lang.String providerName)
public static void resetProviders()
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |