javax.persistence
Class Persistence
java.lang.Object
javax.persistence.Persistence
public class Persistence
- extends Object
Bootstrap class that provides access to an EntityManagerFactory.
Warning: this class is from the
EJB 3.0 Persistence API Early Draft 2 published on February 7, 2005,
and as such is likely to change signifcantly in the future as
the specification nears finalization.
- See Also:
http://java.sun.com/products/ejb/docs.html
|
Field Summary |
static String |
PROVIDER_NAME
Symbolic constant used by calls to createEntityManagerFactory
methods to look up the implementation to load. |
PROVIDER_NAME
public static final String PROVIDER_NAME
- Symbolic constant used by calls to createEntityManagerFactory
methods to look up the implementation to load.
- See Also:
- Constant Field Values
Persistence
public Persistence()
createEntityManagerFactory
public static EntityManagerFactory createEntityManagerFactory(Map m)
- Create an EntityManagerFactory.
This looks through the following
locations for a key called "javax.persistence.provider" that
identifies which implementation should be created:
1. contents of the Map parameter to this method call
2. applet environment
3. system environment
4. the contents of persistence.properties, as loaded by a
call to ClassLoader.getResourceAsStream, using the loader
returned by Thread.getContextClassLoader.
This search path is only used for looking up the setting of
javax.persistence.provider; any vendor-defined settings
will be looked up via means defined by the vendor.
createEntityManagerFactory
public static EntityManagerFactory createEntityManagerFactory()
- Create an EntityManagerFactory. This uses the same means as
createEntityManagerFactory(java.util.Map), except that no
Map parameter is provided.