org.compass.gps.device.jpa
Class ResourceLocalEntityManagerWrapper

java.lang.Object
  extended by org.compass.gps.device.jpa.AbstractEntityManagerWrapper
      extended by org.compass.gps.device.jpa.ResourceLocalEntityManagerWrapper
All Implemented Interfaces:
EntityManagerWrapper

public class ResourceLocalEntityManagerWrapper
extends AbstractEntityManagerWrapper

A JPA Resource Local only EntityManagerWrapper implementation. Creates the EntityManager, and an EntityTransaction.

Author:
kimchy

Field Summary
 
Fields inherited from class org.compass.gps.device.jpa.AbstractEntityManagerWrapper
entityManager, entityManagerFactory, log
 
Constructor Summary
ResourceLocalEntityManagerWrapper()
           
 
Method Summary
protected  void beginTransaction()
           
protected  void commitTransaction()
           
protected  void rollbackTransaction()
           
protected  boolean shouldCloseEntityManager()
           
 
Methods inherited from class org.compass.gps.device.jpa.AbstractEntityManagerWrapper
close, closeOnError, doCreateEntityManager, getEntityManager, newInstance, open, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLocalEntityManagerWrapper

public ResourceLocalEntityManagerWrapper()
Method Detail

beginTransaction

protected void beginTransaction()
                         throws javax.persistence.PersistenceException
Specified by:
beginTransaction in class AbstractEntityManagerWrapper
Throws:
javax.persistence.PersistenceException

commitTransaction

protected void commitTransaction()
                          throws javax.persistence.PersistenceException
Specified by:
commitTransaction in class AbstractEntityManagerWrapper
Throws:
javax.persistence.PersistenceException

rollbackTransaction

protected void rollbackTransaction()
                            throws javax.persistence.PersistenceException
Specified by:
rollbackTransaction in class AbstractEntityManagerWrapper
Throws:
javax.persistence.PersistenceException

shouldCloseEntityManager

protected boolean shouldCloseEntityManager()
Specified by:
shouldCloseEntityManager in class AbstractEntityManagerWrapper


Copyright (c) 2004-2009 The Compass Project.