org.compass.gps.device.jpa.extractor
Class OpenEjbNativeJpaExtractor

java.lang.Object
  extended by org.compass.gps.device.jpa.extractor.OpenEjbNativeJpaExtractor
All Implemented Interfaces:
NativeJpaExtractor

public class OpenEjbNativeJpaExtractor
extends Object
implements NativeJpaExtractor

Extracts the native entity manager factory from a managed OpenEJB one. If Spring has not wrapped the factory, will return it as is.

Author:
kimchy

Constructor Summary
OpenEjbNativeJpaExtractor()
           
 
Method Summary
 javax.persistence.EntityManager extractNative(javax.persistence.EntityManager entityManager)
          Extracts the native EntityManager based on the given EntityManager.
 javax.persistence.EntityManagerFactory extractNative(javax.persistence.EntityManagerFactory entityManagerFactory)
          Returns the actual EntityManagerFactory based on the given EntityManagerFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenEjbNativeJpaExtractor

public OpenEjbNativeJpaExtractor()
Method Detail

extractNative

public javax.persistence.EntityManagerFactory extractNative(javax.persistence.EntityManagerFactory entityManagerFactory)
                                                     throws JpaGpsDeviceException
Description copied from interface: NativeJpaExtractor
Returns the actual EntityManagerFactory based on the given EntityManagerFactory. Should return the same EntityManagerFactory if not wrapping has been done.

Specified by:
extractNative in interface NativeJpaExtractor
Parameters:
entityManagerFactory - The (possibly) wrapped EntityManagerFactory.
Returns:
The actual EntityManagerFactory implementation.
Throws:
JpaGpsDeviceException

extractNative

public javax.persistence.EntityManager extractNative(javax.persistence.EntityManager entityManager)
                                              throws JpaGpsDeviceException
Description copied from interface: NativeJpaExtractor
Extracts the native EntityManager based on the given EntityManager. Should return the same EntityManager if no wrapper has been done.

Specified by:
extractNative in interface NativeJpaExtractor
Parameters:
entityManager - The (possibly) wrapper EntityManager.
Returns:
The actual EntityManager.
Throws:
JpaGpsDeviceException


Copyright (c) 2004-2009 The Compass Project.