|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.jpa.ResourceLocalEntityManagerFactory
public class ResourceLocalEntityManagerFactory
A Cayenne EntityManagerFactory that supports resource-local transactions.
Field Summary | |
---|---|
protected DataDomain |
domain
|
protected boolean |
open
|
protected Provider |
provider
|
protected PersistenceUnitInfo |
unitInfo
|
Constructor Summary | |
---|---|
ResourceLocalEntityManagerFactory(Provider provider,
DataDomain domain,
PersistenceUnitInfo unitInfo)
Creates a new JpaEntityManagerFactory. |
Method Summary | |
---|---|
void |
close()
Close the factory, releasing any resources that it holds. |
EntityManager |
createEntityManager()
Create a new EntityManager. |
EntityManager |
createEntityManager(Map map)
Creates a new resource-local EntityManager with the specified map of properties. |
protected ObjectContext |
createObjectContext()
Creates a new Cayenne ObjectContext based on this factory DataDomain. |
protected PersistenceUnitInfo |
getPersistenceUnitInfo()
Returns wrapped unit. |
Provider |
getProvider()
Returns a parent persistence provider. |
boolean |
isOpen()
Indicates whether the factory is open. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DataDomain domain
protected boolean open
protected PersistenceUnitInfo unitInfo
protected Provider provider
Constructor Detail |
---|
public ResourceLocalEntityManagerFactory(Provider provider, DataDomain domain, PersistenceUnitInfo unitInfo)
Method Detail |
---|
protected PersistenceUnitInfo getPersistenceUnitInfo()
public boolean isOpen()
public void close()
public EntityManager createEntityManager()
EntityManager#isOpen()
method will return true of the returned
instance.
public EntityManager createEntityManager(Map map)
EntityManager#isOpen()
method will return true of the returned instance.
Parameter map is ignored as Cayenne provider defines no properties for
EntityManager as of now.
protected ObjectContext createObjectContext()
ObjectContext
based on this factory DataDomain.
Returned context has lifecycle callbacks enabled, as expected in the JPA
environment.
public Provider getProvider()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |