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

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

public class GlassfishNativeHibernateJpaExtractor
extends Object
implements NativeJpaExtractor

A JPA native extractor that extracts the actual implementation of JPA EntityManagerFactory/EntityManager when running within Glassfish.

Author:
kimchy

Constructor Summary
GlassfishNativeHibernateJpaExtractor()
           
 
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

GlassfishNativeHibernateJpaExtractor

public GlassfishNativeHibernateJpaExtractor()
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.