org.apache.openjpa.persistence
Interface OpenJPAEntityManagerFactorySPI

All Superinterfaces:
EntityManagerFactory, OpenJPAEntityManagerFactory, Serializable
All Known Implementing Classes:
EntityManagerFactoryImpl

public interface OpenJPAEntityManagerFactorySPI
extends OpenJPAEntityManagerFactory


Field Summary
 
Fields inherited from interface org.apache.openjpa.persistence.OpenJPAEntityManagerFactory
CONN_RETAIN_ALWAYS, CONN_RETAIN_DEMAND, CONN_RETAIN_TRANS
 
Method Summary
 void addLifecycleListener(Object listener, Class... classes)
          Register a listener for lifecycle-related events on the specified classes.
 void addTransactionListener(Object listener)
          Register a listener for transaction-related events on the specified classes.
 OpenJPAEntityManagerSPI createEntityManager()
           
 OpenJPAEntityManagerSPI createEntityManager(Map props)
          Return an entity manager with the provided additional configuration settings.
 OpenJPAConfiguration getConfiguration()
          Return the configuration for this factory.
 void removeLifecycleListener(Object listener)
          Remove a listener for lifecycle-related events.
 void removeTransactionListener(Object listener)
          Remove a listener for transaction-related events.
 
Methods inherited from interface org.apache.openjpa.persistence.OpenJPAEntityManagerFactory
getCriteriaBuilder, getDynamicQueryBuilder, getProperties, getQueryResultCache, getStoreCache, getStoreCache, getSupportedProperties, getUserObject, putUserObject
 
Methods inherited from interface javax.persistence.EntityManagerFactory
close, getCache, getMetamodel, getPersistenceUnitUtil, isOpen
 

Method Detail

addLifecycleListener

void addLifecycleListener(Object listener,
                          Class... classes)
Register a listener for lifecycle-related events on the specified classes. If the classes are null, all events will be propagated to the listener. The listener will be passed on to all new entity managers. See the org.apache.openjpa.event package for listener types.

Specified by:
addLifecycleListener in interface OpenJPAEntityManagerFactory
Since:
0.3.3

removeLifecycleListener

void removeLifecycleListener(Object listener)
Remove a listener for lifecycle-related events.

Specified by:
removeLifecycleListener in interface OpenJPAEntityManagerFactory
Since:
0.3.3

addTransactionListener

void addTransactionListener(Object listener)
Register a listener for transaction-related events on the specified classes. The listener will be passed on to all new entity managers. See the org.apache.openjpa.event package for listener types.

Specified by:
addTransactionListener in interface OpenJPAEntityManagerFactory
Since:
1.0.0

removeTransactionListener

void removeTransactionListener(Object listener)
Remove a listener for transaction-related events.

Specified by:
removeTransactionListener in interface OpenJPAEntityManagerFactory
Since:
1.0.0

getConfiguration

OpenJPAConfiguration getConfiguration()
Return the configuration for this factory.

Specified by:
getConfiguration in interface OpenJPAEntityManagerFactory

createEntityManager

OpenJPAEntityManagerSPI createEntityManager()
Specified by:
createEntityManager in interface EntityManagerFactory
Specified by:
createEntityManager in interface OpenJPAEntityManagerFactory

createEntityManager

OpenJPAEntityManagerSPI createEntityManager(Map props)
Description copied from interface: OpenJPAEntityManagerFactory
Return an entity manager with the provided additional configuration settings. OpenJPA recognizes the following configuration settings in this method:

Specified by:
createEntityManager in interface EntityManagerFactory
Specified by:
createEntityManager in interface OpenJPAEntityManagerFactory


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