Package org.apache.openjpa.persistence
Interface OpenJPAEntityManagerFactory
-
- All Superinterfaces:
jakarta.persistence.EntityManagerFactory
,java.io.Serializable
- All Known Subinterfaces:
OpenJPAEntityManagerFactorySPI
- All Known Implementing Classes:
EntityManagerFactoryImpl
public interface OpenJPAEntityManagerFactory extends jakarta.persistence.EntityManagerFactory, java.io.Serializable
Interface implemented by OpenJPA entity manager factories.- Since:
- 0.4.0
- Author:
- Abe White
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONN_RETAIN_ALWAYS
Deprecated.useConnectionRetainMode
enums instead.static int
CONN_RETAIN_DEMAND
Deprecated.useConnectionRetainMode
enums instead.static int
CONN_RETAIN_TRANS
Deprecated.useConnectionRetainMode
enums instead.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addLifecycleListener(java.lang.Object listener, java.lang.Class... classes)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead.void
addTransactionListener(java.lang.Object listener)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead.OpenJPAEntityManager
createEntityManager()
OpenJPAEntityManager
createEntityManager(java.util.Map props)
Return an entity manager with the provided additional configuration settings.OpenJPAConfiguration
getConfiguration()
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead.OpenJPACriteriaBuilder
getCriteriaBuilder()
Gets the QueryBuilder with OpenJPA-extended capabilities.QueryBuilder
getDynamicQueryBuilder()
Gets a builder for dynamic queries.java.util.Map<java.lang.String,java.lang.Object>
getProperties()
Return properties describing this runtime.QueryResultCache
getQueryResultCache()
Access query result cache.StoreCache
getStoreCache()
Access the level 2 store cache.StoreCache
getStoreCache(java.lang.String name)
Access a named level 2 store cache.java.util.Set<java.lang.String>
getSupportedProperties()
Get the properties supported by this runtime.java.lang.Object
getUserObject(java.lang.Object key)
Get the value for the specified key from the map of user objects.java.lang.Object
putUserObject(java.lang.Object key, java.lang.Object val)
Put the specified key-value pair into the map of user objects.void
removeLifecycleListener(java.lang.Object listener)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead.void
removeTransactionListener(java.lang.Object listener)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead.
-
-
-
Field Detail
-
CONN_RETAIN_DEMAND
@Deprecated static final int CONN_RETAIN_DEMAND
Deprecated.useConnectionRetainMode
enums instead.- See Also:
- Constant Field Values
-
CONN_RETAIN_TRANS
@Deprecated static final int CONN_RETAIN_TRANS
Deprecated.useConnectionRetainMode
enums instead.- See Also:
- Constant Field Values
-
CONN_RETAIN_ALWAYS
@Deprecated static final int CONN_RETAIN_ALWAYS
Deprecated.useConnectionRetainMode
enums instead.- See Also:
- Constant Field Values
-
-
Method Detail
-
getProperties
java.util.Map<java.lang.String,java.lang.Object> getProperties()
Return properties describing this runtime.- Specified by:
getProperties
in interfacejakarta.persistence.EntityManagerFactory
-
putUserObject
java.lang.Object putUserObject(java.lang.Object key, java.lang.Object val)
Put the specified key-value pair into the map of user objects.
-
getUserObject
java.lang.Object getUserObject(java.lang.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(java.lang.String name)
Access a named level 2 store cache.
-
getQueryResultCache
QueryResultCache getQueryResultCache()
Access query result cache.
-
createEntityManager
OpenJPAEntityManager createEntityManager()
- Specified by:
createEntityManager
in interfacejakarta.persistence.EntityManagerFactory
-
createEntityManager
OpenJPAEntityManager createEntityManager(java.util.Map props)
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
-
getConfiguration
@Deprecated OpenJPAConfiguration getConfiguration()
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead. This method pierces the published-API boundary, as does the SPI cast.
-
addLifecycleListener
@Deprecated void addLifecycleListener(java.lang.Object listener, java.lang.Class... classes)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead. This method pierces the published-API boundary, as does the SPI cast.
-
removeLifecycleListener
@Deprecated void removeLifecycleListener(java.lang.Object listener)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead. This method pierces the published-API boundary, as does the SPI cast.
-
addTransactionListener
@Deprecated void addTransactionListener(java.lang.Object listener)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead. This method pierces the published-API boundary, as does the SPI cast.
-
removeTransactionListener
@Deprecated void removeTransactionListener(java.lang.Object listener)
Deprecated.cast toOpenJPAEntityManagerFactorySPI
instead. This method pierces the published-API boundary, as does the SPI cast.
-
getDynamicQueryBuilder
QueryBuilder getDynamicQueryBuilder()
Gets a builder for dynamic queries.
-
getCriteriaBuilder
OpenJPACriteriaBuilder getCriteriaBuilder()
Gets the QueryBuilder with OpenJPA-extended capabilities.- Specified by:
getCriteriaBuilder
in interfacejakarta.persistence.EntityManagerFactory
- Since:
- 2.0.0
-
getSupportedProperties
java.util.Set<java.lang.String> getSupportedProperties()
Get the properties supported by this runtime.- Since:
- 2.0.0
-
-