org.compass.gps.device.jpa.embedded
Class GenericJpaHelper

java.lang.Object
  extended by org.compass.gps.device.jpa.embedded.GenericJpaHelper

public class GenericJpaHelper
extends Object

The generic embedded JPA helper can extract a Compass and a JpaCompassGps out of either Hibernate JPA, OpenJPA, TopLink or EclipseLink by identifying it automatically.

Author:
kimchy

Constructor Summary
GenericJpaHelper(javax.persistence.EntityManagerFactory entityManagerFactory)
          Constructs a new helper and tries to autmoatically identify from which JPA provide the embedded Compass can be extracted from.
 
Method Summary
 Compass getCompass()
          Returns the Compass instnace embedded within the JPA EMF.
 javax.persistence.EntityManagerFactory getEntityManagerFactory()
          Returns the EMF provided.
 JpaCompassGps getJpaCompassGps()
          Returns the JpaCompassGps instnace embedded within the JPA EMF.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericJpaHelper

public GenericJpaHelper(javax.persistence.EntityManagerFactory entityManagerFactory)
Constructs a new helper and tries to autmoatically identify from which JPA provide the embedded Compass can be extracted from.

Parameters:
entityManagerFactory - The entity manager factory to get the Compass instance from
Method Detail

getEntityManagerFactory

public javax.persistence.EntityManagerFactory getEntityManagerFactory()
Returns the EMF provided.


getCompass

public Compass getCompass()
Returns the Compass instnace embedded within the JPA EMF.


getJpaCompassGps

public JpaCompassGps getJpaCompassGps()
Returns the JpaCompassGps instnace embedded within the JPA EMF.



Copyright (c) 2004-2009 The Compass Project.