Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.openjpa.persistence
Interface OpenJPAEntityManagerFactory

All Superinterfaces:
  EntityManagerFactory, Serializable

All Known Subinterfaces:
  OpenJPAEntityManagerFactorySPI

All Known Implementing Classes:
  EntityManagerFactoryImpl

    public interface OpenJPAEntityManagerFactory

extends EntityManagerFactory, Serializable

Interface implemented by OpenJPA entity manager factories.

Since:
  0.4.0
Author:
  Abe White

Field Summary
`static int` | `CONN_RETAIN_ALWAYS` Deprecated. use `ConnectionRetainMode` enums instead.
`static int` | `CONN_RETAIN_DEMAND` Deprecated. use `ConnectionRetainMode` enums instead.
`static int` | `CONN_RETAIN_TRANS` Deprecated. use `ConnectionRetainMode` enums instead.

Method Summary
`void` | `addLifecycleListener(Object listener, Class... classes)` Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.
`void` | `addTransactionListener(Object listener)` Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.
`OpenJPAEntityManager` | `createEntityManager()`
`OpenJPAEntityManager` | `createEntityManager(Map props)` Return an entity manager with the provided additional configuration settings.
`OpenJPAConfiguration` | `getConfiguration()` Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.
`OpenJPACriteriaBuilder` | `getCriteriaBuilder()` Gets the QueryBuilder with OpenJPA-extended capabilities.
`QueryBuilder` | `getDynamicQueryBuilder()` Gets a builder for dynamic queries.
`Map<String,Object>` | `getProperties()` Return properties describing this runtime.
`QueryResultCache` | `getQueryResultCache()` Access query result cache.
`StoreCache` | `getStoreCache()` Access the level 2 store cache.
`StoreCache` | `getStoreCache(String name)` Access a named level 2 store cache.
`Set<String>` | `getSupportedProperties()` Get the properties supported by this runtime.
`Object` | `getUserObject(Object key)` Get the value for the specified key from the map of user objects.
`Object` | `putUserObject(Object key, Object val)` Put the specified key-value pair into the map of user objects.
`void` | `removeLifecycleListener(Object listener)` Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.
`void` | `removeTransactionListener(Object listener)` Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.

Methods inherited from interface javax.persistence.EntityManagerFactory
`close, getCache, getMetamodel, getPersistenceUnitUtil, isOpen`

Field Detail

### CONN_RETAIN_DEMAND

    static final int CONN_RETAIN_DEMAND

  Deprecated. use `ConnectionRetainMode` enums instead.
  See Also:
    Constant Field Values

### CONN_RETAIN_TRANS

    static final int CONN_RETAIN_TRANS

  Deprecated. use `ConnectionRetainMode` enums instead.
  See Also:
    Constant Field Values

### CONN_RETAIN_ALWAYS

    static final int CONN_RETAIN_ALWAYS

  Deprecated. use `ConnectionRetainMode` enums instead.
  See Also:
    Constant Field Values

Method Detail

### getProperties

    Map<String,Object> getProperties()

  Return properties describing this runtime.

  Specified by:
    `getProperties` in interface `EntityManagerFactory`

### putUserObject

    Object putUserObject(Object key,
                         Object val)

  Put the specified key-value pair into the map of user objects.

### getUserObject

    Object getUserObject(Object key)

  Get the value for the specified key from the map of user objects.

### getStoreCache

    StoreCache getStoreCache()

  Access the level 2 store cache. This cache acts as a proxy to all named caches.

### getStoreCache

    StoreCache getStoreCache(String name)

  Access a named level 2 store cache.

### getQueryResultCache

    QueryResultCache getQueryResultCache()

  Access query result cache.

### createEntityManager

    OpenJPAEntityManager createEntityManager()

  Specified by:
    `createEntityManager` in interface `EntityManagerFactory`

### createEntityManager

    OpenJPAEntityManager createEntityManager(Map props)

  Return an entity manager with the provided additional configuration settings. OpenJPA recognizes the following configuration settings in this method:
  - openjpa.ConnectionUsername
  - openjpa.ConnectionPassword
  - openjpa.ConnectionRetainMode
  - openjpa.TransactionMode

  Specified by:
    `createEntityManager` in interface `EntityManagerFactory`

### getConfiguration

    OpenJPAConfiguration getConfiguration()

  Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.

### addLifecycleListener

    void addLifecycleListener(Object listener,
                              Class... classes)

  Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.

### removeLifecycleListener

    void removeLifecycleListener(Object listener)

  Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.

### addTransactionListener

    void addTransactionListener(Object listener)

  Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.

### removeTransactionListener

    void removeTransactionListener(Object listener)

  Deprecated. cast to `OpenJPAEntityManagerFactorySPI` instead. This method pierces the published-API boundary, as does the SPI cast.

### getDynamicQueryBuilder

    QueryBuilder getDynamicQueryBuilder()

  Gets a builder for dynamic queries.

### getCriteriaBuilder

    OpenJPACriteriaBuilder getCriteriaBuilder()

  Gets the QueryBuilder with OpenJPA-extended capabilities.

  Specified by:
    `getCriteriaBuilder` in interface `EntityManagerFactory`
  Since:
    2.0.0

### getSupportedProperties

    Set<String> getSupportedProperties()

  Get the properties supported by this runtime.

  Since:
    2.0.0

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.