org.compass.gps.device.hibernate.embedded
Class HibernateHelper

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

public abstract class HibernateHelper
extends Object

A helper class used when working with embedded Compass within Hibernate. Allows for access to the Compass and CompassGps instances.

Author:
kimchy

Method Summary
static Compass getCompass(Session session)
          Returns the Compass instance associated with the given Hibernate from the Hibernate session.
static Compass getCompass(SessionFactory sessionFactory)
          Returns the Compass instance associated with the given Hibernate from the Hiberante session factory.
static CompassGps getCompassGps(HibernateGpsDevice device)
          Returns a CompassGps to wrap the provided Hibernat Gps device.
static CompassGps getCompassGps(SessionFactory sessionFactory)
          Retruns a CompassGps based on the Compass instance associated with the Hibernate session factory.
static CompassTemplate getCompassTempalte(Session session)
          Returns a CompassTemplate instance associated with the given Hibernate from the Hibernate session.
static CompassTemplate getCompassTempalte(SessionFactory sessionFactory)
          Returns the CompassTemplate instance associated with the given Hibernate from the Hiberante session factory.
static Properties getIndexSettings(Session session)
          Returns the settings of the indexing Compass instance (from the CompassGps) associated with Hibernate based on the provided Hibernate session.
static Properties getIndexSettings(SessionFactory sessionFactory)
          Returns the settings of the indexing Compass instance (from the CompassGps) associated with Hibernate based on the provided Hibernate session factory.
 
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(Session session)
Returns the Compass instance associated with the given Hibernate from the Hibernate session.


getCompassTempalte

public static CompassTemplate getCompassTempalte(Session session)
Returns a CompassTemplate instance associated with the given Hibernate from the Hibernate session.


getCompass

public static Compass getCompass(SessionFactory sessionFactory)
Returns the Compass instance associated with the given Hibernate from the Hiberante session factory.


getCompassTempalte

public static CompassTemplate getCompassTempalte(SessionFactory sessionFactory)
Returns the CompassTemplate instance associated with the given Hibernate from the Hiberante session factory.


getIndexSettings

public static Properties getIndexSettings(Session session)
Returns the settings of the indexing Compass instance (from the CompassGps) associated with Hibernate based on the provided Hibernate session.


getIndexSettings

public static Properties getIndexSettings(SessionFactory sessionFactory)
Returns the settings of the indexing Compass instance (from the CompassGps) associated with Hibernate based on the provided Hibernate session factory.


getCompassGps

public static CompassGps getCompassGps(SessionFactory sessionFactory)
Retruns a CompassGps based on the Compass instance associated with the Hibernate session factory.


getCompassGps

public static CompassGps getCompassGps(HibernateGpsDevice device)
Returns a CompassGps to wrap the provided Hibernat Gps device.



Copyright (c) 2004-2008 The Compass Project.