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 TypeMethodDescriptionvoidaddLifecycleListener(Object listener, Class... classes) Register a listener for lifecycle-related events on the specified classes.voidaddTransactionListener(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.voidremoveLifecycleListener(Object listener) Remove a listener for lifecycle-related events.voidremoveTransactionListener(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, unwrapMethods 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.eventpackage for listener types.- Specified by:
addLifecycleListenerin interfaceOpenJPAEntityManagerFactory- Since:
- 0.3.3
-
removeLifecycleListener
Remove a listener for lifecycle-related events.- Specified by:
removeLifecycleListenerin 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.eventpackage for listener types.- Specified by:
addTransactionListenerin interfaceOpenJPAEntityManagerFactory- Since:
- 1.0.0
-
removeTransactionListener
Remove a listener for transaction-related events.- Specified by:
removeTransactionListenerin interfaceOpenJPAEntityManagerFactory- Since:
- 1.0.0
-
getConfiguration
OpenJPAConfiguration getConfiguration()Return the configuration for this factory.- Specified by:
getConfigurationin interfaceOpenJPAEntityManagerFactory
-
createEntityManager
OpenJPAEntityManagerSPI createEntityManager()- Specified by:
createEntityManagerin interfacejakarta.persistence.EntityManagerFactory- Specified by:
createEntityManagerin interfaceOpenJPAEntityManagerFactory
-
createEntityManager
Description copied from interface:OpenJPAEntityManagerFactoryReturn 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:
createEntityManagerin interfacejakarta.persistence.EntityManagerFactory- Specified by:
createEntityManagerin interfaceOpenJPAEntityManagerFactory
-