Package org.apache.openjpa.persistence
Interface OpenJPAEntityManagerFactorySPI
- All Superinterfaces:
jakarta.persistence.EntityManagerFactory
,OpenJPAEntityManagerFactory
,Serializable
- All Known Implementing Classes:
EntityManagerFactoryImpl
-
Field Summary
Fields inherited from interface org.apache.openjpa.persistence.OpenJPAEntityManagerFactory
CONN_RETAIN_ALWAYS, CONN_RETAIN_DEMAND, CONN_RETAIN_TRANS
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.createEntityManager
(Map props) Return an entity manager with the provided additional configuration settings.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 jakarta.persistence.EntityManagerFactory
addNamedEntityGraph, addNamedQuery, close, createEntityManager, createEntityManager, getCache, getMetamodel, getPersistenceUnitUtil, isOpen, unwrap
Methods inherited from interface org.apache.openjpa.persistence.OpenJPAEntityManagerFactory
getCriteriaBuilder, getDynamicQueryBuilder, getProperties, getQueryResultCache, getStoreCache, getStoreCache, getSupportedProperties, getUserObject, putUserObject
-
Method Details
-
addLifecycleListener
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 theorg.apache.openjpa.event
package for listener types.- Specified by:
addLifecycleListener
in interfaceOpenJPAEntityManagerFactory
- Since:
- 0.3.3
-
removeLifecycleListener
Remove a listener for lifecycle-related events.- Specified by:
removeLifecycleListener
in interfaceOpenJPAEntityManagerFactory
- Since:
- 0.3.3
-
addTransactionListener
Register a listener for transaction-related events on the specified classes. The listener will be passed on to all new entity managers. See theorg.apache.openjpa.event
package for listener types.- Specified by:
addTransactionListener
in interfaceOpenJPAEntityManagerFactory
- Since:
- 1.0.0
-
removeTransactionListener
Remove a listener for transaction-related events.- Specified by:
removeTransactionListener
in interfaceOpenJPAEntityManagerFactory
- Since:
- 1.0.0
-
getConfiguration
OpenJPAConfiguration getConfiguration()Return the configuration for this factory.- Specified by:
getConfiguration
in interfaceOpenJPAEntityManagerFactory
-
createEntityManager
OpenJPAEntityManagerSPI createEntityManager()- Specified by:
createEntityManager
in interfacejakarta.persistence.EntityManagerFactory
- Specified by:
createEntityManager
in interfaceOpenJPAEntityManagerFactory
-
createEntityManager
Description copied from interface:OpenJPAEntityManagerFactory
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 interfacejakarta.persistence.EntityManagerFactory
- Specified by:
createEntityManager
in interfaceOpenJPAEntityManagerFactory
-