|
||||||||||
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 javax.persistence.spi.PersistenceUnitInfo |
unitInfo
|
Constructor Summary | |
---|---|
ResourceLocalEntityManagerFactory(Provider provider,
DataDomain domain,
javax.persistence.spi.PersistenceUnitInfo unitInfo)
Creates a new JpaEntityManagerFactory. |
Method Summary | |
---|---|
void |
close()
Close the factory, releasing any resources that it holds. |
javax.persistence.EntityManager |
createEntityManager()
Create a new EntityManager. |
javax.persistence.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 javax.persistence.spi.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 javax.persistence.spi.PersistenceUnitInfo unitInfo
protected Provider provider
Constructor Detail |
---|
public ResourceLocalEntityManagerFactory(Provider provider, DataDomain domain, javax.persistence.spi.PersistenceUnitInfo unitInfo)
Method Detail |
---|
protected javax.persistence.spi.PersistenceUnitInfo getPersistenceUnitInfo()
public boolean isOpen()
isOpen
in interface javax.persistence.EntityManagerFactory
public void close()
close
in interface javax.persistence.EntityManagerFactory
public javax.persistence.EntityManager createEntityManager()
EntityManager.isOpen()
method will return true of the returned
instance.
createEntityManager
in interface javax.persistence.EntityManagerFactory
public javax.persistence.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.
createEntityManager
in interface javax.persistence.EntityManagerFactory
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 |