|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.persistence.EntityManagerFactoryImpl
public class EntityManagerFactoryImpl
Implementation of EntityManagerFactory
that acts as a
facade to a BrokerFactory
.
Constructor Summary | |
---|---|
EntityManagerFactoryImpl()
Default constructor provided for auto-instantiation. |
|
EntityManagerFactoryImpl(BrokerFactory factory)
Supply delegate on construction. |
Method Summary | |
---|---|
void |
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. |
void |
close()
|
OpenJPAEntityManagerSPI |
createEntityManager()
|
OpenJPAEntityManagerSPI |
createEntityManager(Map props)
Return an entity manager with the provided additional configuration settings. |
boolean |
equals(Object other)
|
BrokerFactory |
getBrokerFactory()
Delegate. |
OpenJPAConfiguration |
getConfiguration()
Return the configuration for this factory. |
Properties |
getProperties()
Return properties describing this runtime. |
QueryResultCache |
getQueryResultCache()
Access query result cache. |
StoreCache |
getStoreCache()
Access the level 2 store cache. |
StoreCache |
getStoreCache(String cacheName)
Access a named level 2 store cache. |
Object |
getUserObject(Object key)
Get the value for the specified key from the map of user objects. |
int |
hashCode()
|
boolean |
isOpen()
|
protected EntityManagerImpl |
newEntityManagerImpl(Broker broker)
Create a new entity manager around the given broker. |
Object |
putUserObject(Object key,
Object val)
Put the specified key-value pair into the map of user objects. |
void |
removeLifecycleListener(Object listener)
Remove a listener for lifecycle-related events. |
void |
removeTransactionListener(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 OpenJPAEntityManagerFactorySPI
public Properties getProperties()
OpenJPAEntityManagerFactory
getProperties
in interface OpenJPAEntityManagerFactory
public Object putUserObject(Object key, Object val)
OpenJPAEntityManagerFactory
putUserObject
in interface OpenJPAEntityManagerFactory
public Object getUserObject(Object key)
OpenJPAEntityManagerFactory
getUserObject
in interface OpenJPAEntityManagerFactory
public StoreCache getStoreCache()
OpenJPAEntityManagerFactory
getStoreCache
in interface OpenJPAEntityManagerFactory
public StoreCache getStoreCache(String cacheName)
OpenJPAEntityManagerFactory
getStoreCache
in interface OpenJPAEntityManagerFactory
public QueryResultCache getQueryResultCache()
OpenJPAEntityManagerFactory
getQueryResultCache
in interface OpenJPAEntityManagerFactory
public OpenJPAEntityManagerSPI createEntityManager()
createEntityManager
in interface EntityManagerFactory
createEntityManager
in interface OpenJPAEntityManagerFactory
createEntityManager
in interface OpenJPAEntityManagerFactorySPI
public OpenJPAEntityManagerSPI createEntityManager(Map props)
OpenJPAEntityManagerFactory
createEntityManager
in interface EntityManagerFactory
createEntityManager
in interface OpenJPAEntityManagerFactory
createEntityManager
in interface OpenJPAEntityManagerFactorySPI
protected EntityManagerImpl newEntityManagerImpl(Broker broker)
public void addLifecycleListener(Object listener, Class... classes)
OpenJPAEntityManagerFactorySPI
org.apache.openjpa.event
package for
listener types.
addLifecycleListener
in interface OpenJPAEntityManagerFactorySPI
public void removeLifecycleListener(Object listener)
OpenJPAEntityManagerFactorySPI
removeLifecycleListener
in interface OpenJPAEntityManagerFactorySPI
public void addTransactionListener(Object listener)
OpenJPAEntityManagerFactorySPI
org.apache.openjpa.event
package for
listener types.
addTransactionListener
in interface OpenJPAEntityManagerFactorySPI
public void removeTransactionListener(Object listener)
OpenJPAEntityManagerFactorySPI
removeTransactionListener
in interface OpenJPAEntityManagerFactorySPI
public void close()
close
in interface EntityManagerFactory
close
in interface Closeable
public boolean isOpen()
isOpen
in interface EntityManagerFactory
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |