Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.sessions.entitymanager
Class Persistence

`java.lang.Object
oracle.toplink.sessions.entitymanager.Persistence`

public class Persistence
extends java.lang.Object

Bootstrap class that provides access to an `EntityManagerFactory`, from which `EntityManager` references can be obtained.

Field Summary
`static java.lang.String` | `PROVIDER_NAME` Symbolic constant used by calls to `createEntityManagerFactory(java.util.Map)` methods to look up the implementation to load.

Constructor Summary
`Persistence()`

Method Summary
`static EntityManagerFactory` | `createEntityManagerFactory()` Create an `EntityManagerFactory`.
`static EntityManagerFactory` | `createEntityManagerFactory(java.util.Map m)` Create an `EntityManagerFactory`.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROVIDER_NAME

    public static final java.lang.String PROVIDER_NAME

  Symbolic constant used by calls to `createEntityManagerFactory(java.util.Map)` methods to look up the implementation to load. This is set to "javax.persistence.provider".
  See Also:
    Constant Field Values

Constructor Detail

### Persistence

    public Persistence()

Method Detail

### createEntityManagerFactory

    public static EntityManagerFactory createEntityManagerFactory(java.util.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(java.lang.String)`.
  Note: we can steal some good copy from the javax.naming.Context and InitialContext JavaDocs, which outline similar rules for locating environment settings.

### createEntityManagerFactory

    public static EntityManagerFactory createEntityManagerFactory()

  Create an `EntityManagerFactory`. This uses the same heuristics as `createEntityManagerFactory(java.util.Map)`, except that no invocation-specific information is used here.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD