org.apache.openjpa.persistence
Interface OpenJPAEntityManagerFactory

All Superinterfaces:
Serializable
All Known Subinterfaces:
OpenJPAEntityManagerFactorySPI
All Known Implementing Classes:
EntityManagerFactoryImpl

public interface OpenJPAEntityManagerFactory
extends 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.
 Properties 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.
 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.
 

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

Properties getProperties()
Return properties describing this runtime.


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()

createEntityManager

OpenJPAEntityManager createEntityManager(Map props)
Return an entity manager with the provided additional configuration settings. OpenJPA recognizes the following configuration settings in this method:


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.



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