Package org.apache.openjpa.persistence
Interface OpenJPAEntityManagerFactorySPI
-
- All Superinterfaces:
jakarta.persistence.EntityManagerFactory
,OpenJPAEntityManagerFactory
,java.io.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLifecycleListener(java.lang.Object listener, java.lang.Class... classes)
Register a listener for lifecycle-related events on the specified classes.void
addTransactionListener(java.lang.Object listener)
Register a listener for transaction-related events on the specified classes.OpenJPAEntityManagerSPI
createEntityManager()
OpenJPAEntityManagerSPI
createEntityManager(java.util.Map props)
Return an entity manager with the provided additional configuration settings.OpenJPAConfiguration
getConfiguration()
Return the configuration for this factory.void
removeLifecycleListener(java.lang.Object listener)
Remove a listener for lifecycle-related events.void
removeTransactionListener(java.lang.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 Detail
-
addLifecycleListener
void addLifecycleListener(java.lang.Object listener, java.lang.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 theorg.apache.openjpa.event
package for listener types.- Specified by:
addLifecycleListener
in interfaceOpenJPAEntityManagerFactory
- Since:
- 0.3.3
-
removeLifecycleListener
void removeLifecycleListener(java.lang.Object listener)
Remove a listener for lifecycle-related events.- Specified by:
removeLifecycleListener
in interfaceOpenJPAEntityManagerFactory
- Since:
- 0.3.3
-
addTransactionListener
void addTransactionListener(java.lang.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 theorg.apache.openjpa.event
package for listener types.- Specified by:
addTransactionListener
in interfaceOpenJPAEntityManagerFactory
- Since:
- 1.0.0
-
removeTransactionListener
void removeTransactionListener(java.lang.Object listener)
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
OpenJPAEntityManagerSPI createEntityManager(java.util.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:- openjpa.ConnectionUsername
- openjpa.ConnectionPassword
- openjpa.ConnectionRetainMode
- openjpa.TransactionMode
- Specified by:
createEntityManager
in interfacejakarta.persistence.EntityManagerFactory
- Specified by:
createEntityManager
in interfaceOpenJPAEntityManagerFactory
-
-