| org.ow2.easybeans.persistence.api.EZBPersistenceUnitManager
All known Subclasses: org.ow2.easybeans.persistence.PersistenceUnitManager,
EZBPersistenceUnitManager | public interface EZBPersistenceUnitManager (Code) | | Allows to get persistence units and allow to return EntityManager or
EntityManagerFactory.
author: Florent Benoit |
Method Summary | |
void | addCurrent() Create a new EntityManager on each PersistenceContext. | void | closeCurrentAndReturnToPrevious() Sets back to the previous entity manager and close the current entity
manager for each persistence context. | EntityManager | getEntityManager(String unitName, PersistenceContextType type) Gets an entity manager for the given unit name and the extra attributes. | EntityManagerFactory | getEntityManagerFactory(String unitName) Gets an entity manager factory for the given unit name. | void | merge(EZBPersistenceUnitManager otherPersistenceUnitManager) Merge the persistence context of a an other persistent unit manager in
this one. |
addCurrent | void addCurrent()(Code) | | Create a new EntityManager on each PersistenceContext. (Will be used for
the method lifecycle)
|
closeCurrentAndReturnToPrevious | void closeCurrentAndReturnToPrevious()(Code) | | Sets back to the previous entity manager and close the current entity
manager for each persistence context.
|
getEntityManager | EntityManager getEntityManager(String unitName, PersistenceContextType type)(Code) | | Gets an entity manager for the given unit name and the extra attributes.
Parameters: unitName - the name of the persistence unit Parameters: type - the type of the persistence context entity manager corresponding to arguments |
getEntityManagerFactory | EntityManagerFactory getEntityManagerFactory(String unitName)(Code) | | Gets an entity manager factory for the given unit name.
Parameters: unitName - the name of the persistence unit entity manager factory. |
merge | void merge(EZBPersistenceUnitManager otherPersistenceUnitManager)(Code) | | Merge the persistence context of a an other persistent unit manager in
this one. Note that as specified in chapter 6.2.2 (persistence unit
scope), an EAR level component level will only be seen by a subcomponent
if it was not redefined. In our case : don't merge the given unit-name if
the current manager defines this unit-name.
Parameters: otherPersistenceUnitManager - the other persistence unit managerthat will be merged into this one. |
|
|