javax.persistence
Class Persistence

java.lang.Object
  extended by javax.persistence.Persistence

public class Persistence
extends java.lang.Object

Bootstrap class to obtain an EntityManagerFactory.


Field Summary
static java.lang.String PERSISTENCE_PROVIDER
          Deprecated. 
protected static java.util.Set<PersistenceProvider> providers
          Deprecated. 
 
Constructor Summary
Persistence()
           
 
Method Summary
static EntityManagerFactory createEntityManagerFactory(java.lang.String name)
          Create an return an EntityManagerFactory for the named unit.
static EntityManagerFactory createEntityManagerFactory(java.lang.String name, java.util.Map props)
          Create and return an EntityManagerFactory for the named unit.
static PersistenceUtil getPersistenceUtil()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

providers

@Deprecated
protected static final java.util.Set<PersistenceProvider> providers
Deprecated. 

PERSISTENCE_PROVIDER

@Deprecated
public static final java.lang.String PERSISTENCE_PROVIDER
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

Persistence

public Persistence()
Method Detail

createEntityManagerFactory

public static EntityManagerFactory createEntityManagerFactory(java.lang.String name)
Create an return an EntityManagerFactory for the named unit.

Parameters:
name - - the name of the persistence unit

createEntityManagerFactory

public static EntityManagerFactory createEntityManagerFactory(java.lang.String name,
                                                              java.util.Map props)
Create and return an EntityManagerFactory for the named unit.

Parameters:
name - - the name of the persistence unit
props - - persistence unit properties

getPersistenceUtil

public static PersistenceUtil getPersistenceUtil()