|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.persistence.EntityManagerFactoryImpl
public class EntityManagerFactoryImpl
Implementation of EntityManagerFactory that acts as a
facade to a BrokerFactory.
| Field Summary |
|---|
| Fields inherited from interface org.apache.openjpa.persistence.OpenJPAEntityManagerFactory |
|---|
CONN_RETAIN_ALWAYS, CONN_RETAIN_DEMAND, CONN_RETAIN_TRANS |
| Constructor Summary | |
|---|---|
EntityManagerFactoryImpl()
Default constructor provided for auto-instantiation. |
|
EntityManagerFactoryImpl(BrokerFactory factory)
Supply delegate on construction. |
|
| Method Summary | |
|---|---|
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. |
void |
close()
|
OpenJPAEntityManagerSPI |
createEntityManager()
|
OpenJPAEntityManagerSPI |
createEntityManager(java.util.Map props)
Creates and configures a entity manager with the given properties. |
boolean |
equals(java.lang.Object other)
|
BrokerFactory |
getBrokerFactory()
Delegate. |
javax.persistence.Cache |
getCache()
|
OpenJPAConfiguration |
getConfiguration()
Return the configuration for this factory. |
OpenJPACriteriaBuilder |
getCriteriaBuilder()
Gets the QueryBuilder with OpenJPA-extended capabilities. |
OpenJPAQueryBuilder |
getDynamicQueryBuilder()
Gets a builder for dynamic queries. |
java.lang.Object |
getIdentifier(java.lang.Object entity)
Get the identifier for the specified entity. |
MetamodelImpl |
getMetamodel()
|
javax.persistence.PersistenceUnitUtil |
getPersistenceUnitUtil()
|
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 cacheName)
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. |
int |
hashCode()
|
boolean |
isLoaded(java.lang.Object entity)
|
boolean |
isLoaded(java.lang.Object entity,
java.lang.String attribute)
|
boolean |
isOpen()
|
protected EntityManagerImpl |
newEntityManagerImpl(Broker broker)
Create a new entity manager around the given broker. |
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)
Remove a listener for lifecycle-related events. |
void |
removeTransactionListener(java.lang.Object listener)
Remove a listener for transaction-related events. |
void |
setBrokerFactory(BrokerFactory factory)
Delegate must be provided before use. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EntityManagerFactoryImpl()
public EntityManagerFactoryImpl(BrokerFactory factory)
| Method Detail |
|---|
public BrokerFactory getBrokerFactory()
public void setBrokerFactory(BrokerFactory factory)
public OpenJPAConfiguration getConfiguration()
OpenJPAEntityManagerFactorySPI
getConfiguration in interface OpenJPAEntityManagerFactorygetConfiguration in interface OpenJPAEntityManagerFactorySPIpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
OpenJPAEntityManagerFactory
getProperties in interface javax.persistence.EntityManagerFactorygetProperties in interface OpenJPAEntityManagerFactory
public java.lang.Object putUserObject(java.lang.Object key,
java.lang.Object val)
OpenJPAEntityManagerFactory
putUserObject in interface OpenJPAEntityManagerFactorypublic java.lang.Object getUserObject(java.lang.Object key)
OpenJPAEntityManagerFactory
getUserObject in interface OpenJPAEntityManagerFactorypublic StoreCache getStoreCache()
OpenJPAEntityManagerFactory
getStoreCache in interface OpenJPAEntityManagerFactorypublic StoreCache getStoreCache(java.lang.String cacheName)
OpenJPAEntityManagerFactory
getStoreCache in interface OpenJPAEntityManagerFactorypublic QueryResultCache getQueryResultCache()
OpenJPAEntityManagerFactory
getQueryResultCache in interface OpenJPAEntityManagerFactorypublic OpenJPAEntityManagerSPI createEntityManager()
createEntityManager in interface javax.persistence.EntityManagerFactorycreateEntityManager in interface OpenJPAEntityManagerFactorycreateEntityManager in interface OpenJPAEntityManagerFactorySPIpublic OpenJPAEntityManagerSPI createEntityManager(java.util.Map props)
createEntityManager in interface javax.persistence.EntityManagerFactorycreateEntityManager in interface OpenJPAEntityManagerFactorycreateEntityManager in interface OpenJPAEntityManagerFactorySPIprotected EntityManagerImpl newEntityManagerImpl(Broker broker)
public void addLifecycleListener(java.lang.Object listener,
java.lang.Class... classes)
OpenJPAEntityManagerFactorySPIorg.apache.openjpa.event package for
listener types.
addLifecycleListener in interface OpenJPAEntityManagerFactoryaddLifecycleListener in interface OpenJPAEntityManagerFactorySPIpublic void removeLifecycleListener(java.lang.Object listener)
OpenJPAEntityManagerFactorySPI
removeLifecycleListener in interface OpenJPAEntityManagerFactoryremoveLifecycleListener in interface OpenJPAEntityManagerFactorySPIpublic void addTransactionListener(java.lang.Object listener)
OpenJPAEntityManagerFactorySPIorg.apache.openjpa.event package for
listener types.
addTransactionListener in interface OpenJPAEntityManagerFactoryaddTransactionListener in interface OpenJPAEntityManagerFactorySPIpublic void removeTransactionListener(java.lang.Object listener)
OpenJPAEntityManagerFactorySPI
removeTransactionListener in interface OpenJPAEntityManagerFactoryremoveTransactionListener in interface OpenJPAEntityManagerFactorySPIpublic void close()
close in interface javax.persistence.EntityManagerFactoryclose in interface Closeablepublic boolean isOpen()
isOpen in interface javax.persistence.EntityManagerFactorypublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic javax.persistence.Cache getCache()
getCache in interface javax.persistence.EntityManagerFactorypublic OpenJPACriteriaBuilder getCriteriaBuilder()
OpenJPAEntityManagerFactory
getCriteriaBuilder in interface javax.persistence.EntityManagerFactorygetCriteriaBuilder in interface OpenJPAEntityManagerFactorypublic OpenJPAQueryBuilder getDynamicQueryBuilder()
OpenJPAEntityManagerFactory
getDynamicQueryBuilder in interface OpenJPAEntityManagerFactorypublic java.util.Set<java.lang.String> getSupportedProperties()
OpenJPAEntityManagerFactory
getSupportedProperties in interface OpenJPAEntityManagerFactorypublic MetamodelImpl getMetamodel()
getMetamodel in interface javax.persistence.EntityManagerFactorypublic javax.persistence.PersistenceUnitUtil getPersistenceUnitUtil()
getPersistenceUnitUtil in interface javax.persistence.EntityManagerFactorypublic java.lang.Object getIdentifier(java.lang.Object entity)
getIdentifier in interface javax.persistence.PersistenceUnitUtilpublic boolean isLoaded(java.lang.Object entity)
isLoaded in interface javax.persistence.PersistenceUnitUtilisLoaded in interface javax.persistence.PersistenceUtil
public boolean isLoaded(java.lang.Object entity,
java.lang.String attribute)
isLoaded in interface javax.persistence.PersistenceUnitUtilisLoaded in interface javax.persistence.PersistenceUtil
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||