org.compass.gps.device.jpa.embedded.hibernate
Class HibernateJpaHelper

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

public abstract class HibernateJpaHelper
extends Object

A helper class allowing to get Compass and JpaCompassGps when working with Hibernate JPA in an embedded mode.

Author:
kimchy

Method Summary
static Compass getCompass(javax.persistence.EntityManager em)
          Returns the Compass instance assoicated with the given OpenJPA EntityManager.
static Compass getCompass(javax.persistence.EntityManagerFactory emf)
          Returns the Compass instance assoicated with the given Hibernate EntityManagerFactory.
static JpaCompassGps getCompassGps(javax.persistence.EntityManagerFactory emf)
          Returns a new instnacoef of a JpaCompassGps built on top of the embedded Compass instance.
static JpaCompassGps getCompassGps(JpaGpsDevice device)
          Returns a new instnacoef of a JpaCompassGps built on top of the embedded Compass instance.
static CompassTemplate getCompassTemplate(javax.persistence.EntityManager em)
          Returns the CompassTemplate instance assoicated with the given OpenJPA EntityManager.
static CompassTemplate getCompassTemplate(javax.persistence.EntityManagerFactory emf)
          Returns the CompassTemplate instance assoicated with the given Hibernate EntityManagerFactory.
static Properties getIndexSettings(javax.persistence.EntityManager em)
          Returns the index settings that are configured within the EntityManager configuration.
static Properties getIndexSettings(javax.persistence.EntityManagerFactory emf)
          Returns the index settings that are configured within the EntityManagerFactory configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCompass

public static Compass getCompass(javax.persistence.EntityManagerFactory emf)
Returns the Compass instance assoicated with the given Hibernate EntityManagerFactory. This allows to get a Compass instnace in order to perform search operations for example outside of a JPA transaction (for performance reasons, mostly there is no need to start a DB transaction).


getCompassTemplate

public static CompassTemplate getCompassTemplate(javax.persistence.EntityManagerFactory emf)
Returns the CompassTemplate instance assoicated with the given Hibernate EntityManagerFactory. This allows to get a Compass instnace in order to perform search operations for example outside of a JPA transaction (for performance reasons, mostly there is no need to start a DB transaction).


getCompass

public static Compass getCompass(javax.persistence.EntityManager em)
Returns the Compass instance assoicated with the given OpenJPA EntityManager. This allows to get a Compass instnace in order to perform search operations for example outside of a JPA transaction (for performance reasons, mostly there is no need to start a DB transaction).


getCompassTemplate

public static CompassTemplate getCompassTemplate(javax.persistence.EntityManager em)
Returns the CompassTemplate instance assoicated with the given OpenJPA EntityManager. This allows to get a Compass instnace in order to perform search operations for example outside of a JPA transaction (for performance reasons, mostly there is no need to start a DB transaction).


getIndexSettings

public static Properties getIndexSettings(javax.persistence.EntityManagerFactory emf)
Returns the index settings that are configured within the EntityManagerFactory configuration. Can be used to configure exteranally a JpaCompassGps instance.


getIndexSettings

public static Properties getIndexSettings(javax.persistence.EntityManager em)
Returns the index settings that are configured within the EntityManager configuration. Can be used to configure exteranally a JpaCompassGps instnace.


getCompassGps

public static JpaCompassGps getCompassGps(javax.persistence.EntityManagerFactory emf)
Returns a new instnacoef of a JpaCompassGps built on top of the embedded Compass instance.


getCompassGps

public static JpaCompassGps getCompassGps(JpaGpsDevice device)
Returns a new instnacoef of a JpaCompassGps built on top of the embedded Compass instance.



Copyright (c) 2004-2008 The Compass Project.