org.compass.gps.device.hibernate.dep
Class Hibernate2GpsDevice
java.lang.Object
org.compass.gps.device.AbstractGpsDevice
org.compass.gps.device.support.parallel.AbstractParallelGpsDevice
org.compass.gps.device.hibernate.dep.AbstractHibernateGpsDevice
org.compass.gps.device.hibernate.dep.Hibernate2GpsDevice
- All Implemented Interfaces:
- CompassGpsDevice
public class Hibernate2GpsDevice
- extends AbstractHibernateGpsDevice
A HibernateGpsDevice which works with hibernate 2.
You must either set the Hibernate Configuration or the
SessionFactory to be used by the device. Note that if the
Configuration is supplied, when the device start
is called, a new SessionFactory will be built.
Note: Only provides the index() operation. No real time index
updated are performed since the Hiberante Interceptor provides
null values for newly created objects with generated ids.
- Author:
- kimchy
| Methods inherited from class org.compass.gps.device.AbstractGpsDevice |
buildMessage, getGps, getName, injectGps, isFilteredForIndex, isPerformingIndexOperation, isRunning, refresh, setFilteredEntitiesForIndex, setName, shouldMirrorDataChanges, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Hibernate2GpsDevice
public Hibernate2GpsDevice()
Hibernate2GpsDevice
public Hibernate2GpsDevice(String name,
net.sf.hibernate.SessionFactory sessionFactory)
Hibernate2GpsDevice
public Hibernate2GpsDevice(String name,
net.sf.hibernate.cfg.Configuration configuration)
setSessionFactory
public void setSessionFactory(net.sf.hibernate.SessionFactory sessionFactory)
setConfiguration
public void setConfiguration(net.sf.hibernate.cfg.Configuration configuration)
doStart
protected void doStart()
throws CompassGpsException
- Description copied from class:
AbstractGpsDevice
- Derived devices can implement it in case of start event notification.
- Overrides:
doStart in class AbstractGpsDevice
- Throws:
CompassGpsException
doStop
protected void doStop()
throws CompassGpsException
- Description copied from class:
AbstractGpsDevice
- Derived devices can implement it in case of stop event notification.
- Overrides:
doStop in class AbstractGpsDevice
- Throws:
CompassGpsException
doGetHibernateSessionWrapper
protected AbstractHibernateGpsDevice.HibernateSessionWrapper doGetHibernateSessionWrapper()
- Specified by:
doGetHibernateSessionWrapper in class AbstractHibernateGpsDevice
doGetHibernateEntitiesInfo
protected HibernateEntityInfo[] doGetHibernateEntitiesInfo()
throws HibernateGpsDeviceException
- Description copied from class:
AbstractHibernateGpsDevice
- Returns all the hibernate entity info. Called when the device starts up.
- Specified by:
doGetHibernateEntitiesInfo in class AbstractHibernateGpsDevice
- Returns:
- Hibernate class informtion
- Throws:
HibernateGpsDeviceException
doGetObjects
protected List doGetObjects(HibernateEntityInfo info,
int from,
int count,
AbstractHibernateGpsDevice.HibernateSessionWrapper sessionWrapper)
throws HibernateGpsDeviceException
- Description copied from class:
AbstractHibernateGpsDevice
- Returns the data that maps to the given class info, paginated with from
and count.
- Specified by:
doGetObjects in class AbstractHibernateGpsDevice
- Throws:
HibernateGpsDeviceException
Copyright (c) 2004-2008 The Compass Project.