|
||||||||||
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
.
Field Summary |
---|
Fields inherited from interface org.apache.openjpa.kernel.ConnectionRetainModes |
---|
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(Object listener,
Class... classes)
Register a listener for lifecycle-related events on the specified classes. |
void |
close()
|
OpenJPAEntityManager |
createEntityManager()
|
OpenJPAEntityManager |
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 |
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()
OpenJPAEntityManagerFactory
getConfiguration
in interface OpenJPAEntityManagerFactory
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 OpenJPAEntityManager createEntityManager()
createEntityManager
in interface OpenJPAEntityManagerFactory
public OpenJPAEntityManager createEntityManager(Map props)
OpenJPAEntityManagerFactory
createEntityManager
in interface OpenJPAEntityManagerFactory
protected EntityManagerImpl newEntityManagerImpl(Broker broker)
public void addLifecycleListener(Object listener, Class... classes)
OpenJPAEntityManagerFactory
org.apache.openjpa.event
package for
listener types.
addLifecycleListener
in interface OpenJPAEntityManagerFactory
public void removeLifecycleListener(Object listener)
OpenJPAEntityManagerFactory
removeLifecycleListener
in interface OpenJPAEntityManagerFactory
public void close()
close
in interface Closeable
public boolean isOpen()
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 |