| org.compass.gps.device.jpa.EntityManagerWrapper
All known Subclasses: org.compass.gps.device.jpa.AbstractEntityManagerWrapper,
EntityManagerWrapper | public interface EntityManagerWrapper (Code) | | An EntityManager wrapper allows controlling the creation and destruction of JPA
EntityManager s, as well as any transactions control (such as JPA resource local
EntityTransaction).
Used by
JpaGpsDevice when performing the index operation.
author: kimchy |
Method Summary | |
void | close() Closes the current EntityManager , commiting the transaction if necessary. | void | closeOnError() Closes the current EntityManager , rollback the transaction if necessary. | EntityManager | getEntityManager() Returns the EntityManager opened by the wrapper open operation. | EntityManagerWrapper | newInstance() Creates a new instance of this entity manager wrapper for multi threaded usage. | void | open() Opens the warpper for a session of reading enteties for indexing. | void | setUp(EntityManagerFactory entityManagerFactory) Sets up the entity manager wrapper with the EntityManagerFactory . |
getEntityManager | EntityManager getEntityManager() throws IllegalStateException(Code) | | Returns the EntityManager opened by the wrapper open operation.
The current EntityManager throws: IllegalStateException - If not called between the open and close* operations |
newInstance | EntityManagerWrapper newInstance()(Code) | | Creates a new instance of this entity manager wrapper for multi threaded usage.
|
open | void open() throws JpaGpsDeviceException, PersistenceException(Code) | | Opens the warpper for a session of reading enteties for indexing.
|
setUp | void setUp(EntityManagerFactory entityManagerFactory)(Code) | | Sets up the entity manager wrapper with the EntityManagerFactory .
Parameters: entityManagerFactory - The EntityManagerFactory the wrapper will use |
|
|