org.compass.gps.device.hibernate.dep
Class Hibernate3GpsDevice

java.lang.Object
  extended by org.compass.gps.device.AbstractGpsDevice
      extended by org.compass.gps.device.support.parallel.AbstractParallelGpsDevice
          extended by org.compass.gps.device.hibernate.dep.AbstractHibernateGpsDevice
              extended by org.compass.gps.device.hibernate.dep.Hibernate3GpsDevice
All Implemented Interfaces:
CompassGpsDevice, MirrorDataChangesGpsDevice, PassiveMirrorGpsDevice
Direct Known Subclasses:
SpringHibernate3GpsDevice

Deprecated. Please use HibernateGpsDevice.

public class Hibernate3GpsDevice
extends AbstractHibernateGpsDevice
implements PassiveMirrorGpsDevice

A hibernate device which works with hibernate 3.

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.

Provides support for real time index updates using the new Hibernate 3 event system. The device uses the PostInsertEventListener, PostUpdateEventListener, and PostDeleteEventListener events.

Author:
kimchy

Nested Class Summary
 class Hibernate3GpsDevice.Hibernate3SessionWrapper
          Deprecated.  
 
Nested classes/interfaces inherited from class org.compass.gps.device.hibernate.dep.AbstractHibernateGpsDevice
AbstractHibernateGpsDevice.HibernateSessionWrapper
 
Field Summary
 
Fields inherited from class org.compass.gps.device.hibernate.dep.AbstractHibernateGpsDevice
fetchCount
 
Fields inherited from class org.compass.gps.device.AbstractGpsDevice
compassGps, log
 
Constructor Summary
Hibernate3GpsDevice()
          Deprecated.  
Hibernate3GpsDevice(String name, Configuration configuration)
          Deprecated.  
Hibernate3GpsDevice(String name, SessionFactory sessionFactory)
          Deprecated.  
 
Method Summary
protected  SessionFactory doGetActualSessionFactory()
          Deprecated. A helper method that returns the actual session factory for event registration.
protected  HibernateEntityInfo[] doGetHibernateEntitiesInfo()
          Deprecated. Returns all the hibernate entity info.
protected  AbstractHibernateGpsDevice.HibernateSessionWrapper doGetHibernateSessionWrapper()
          Deprecated.  
protected  List doGetObjects(HibernateEntityInfo info, int from, int count, AbstractHibernateGpsDevice.HibernateSessionWrapper sessionWrapper)
          Deprecated. Returns the data that maps to the given class info, paginated with from and count.
protected  Query doGetQuery(HibernateEntityInfo info, Session session)
          Deprecated. Can be used to override query creation for a certain hibernate entity info.
protected  void doStart()
          Deprecated. Derived devices can implement it in case of start event notification.
protected  void doStop()
          Deprecated. Derived devices can implement it in case of stop event notification.
 boolean isIgnoreMirrorExceptions()
          Deprecated. Should exceptions be ignored during the mirroring operations (the Hibernate event listeners).
protected  boolean isInherited(ClassMetadata classMetadata)
          Deprecated.  
 boolean isMirrorDataChanges()
          Deprecated. Should the device perform real time data mirroring.
 void setConfiguration(Configuration configuration)
          Deprecated.  
 void setIgnoreMirrorExceptions(boolean ignoreMirrorExceptions)
          Deprecated. Should exceptions be ignored during the mirroring operations (the Hibernate event listeners).
 void setMirrorDataChanges(boolean mirrorDataChanges)
          Deprecated. Sets if the device will perform real time data changes mirroring.
 void setMirrorFilter(HibernateMirrorFilter mirrorFilter)
          Deprecated. Sets a mirroring filter that can filter hibernate mirror events.
 void setSessionFactory(SessionFactory sessionFactory)
          Deprecated.  
 
Methods inherited from class org.compass.gps.device.hibernate.dep.AbstractHibernateGpsDevice
doGetIndexEntities, doGetIndexEntitiesIndexer, setFetchCount
 
Methods inherited from class org.compass.gps.device.support.parallel.AbstractParallelGpsDevice
doIndex, index, setIndexEntitiesPartitioner, setParallelIndexExecutor, start
 
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
 
Methods inherited from interface org.compass.gps.CompassGpsDevice
getGps, getName, index, injectGps, isPerformingIndexOperation, isRunning, refresh, setName, shouldMirrorDataChanges, start, stop
 

Constructor Detail

Hibernate3GpsDevice

public Hibernate3GpsDevice()
Deprecated. 

Hibernate3GpsDevice

public Hibernate3GpsDevice(String name,
                           SessionFactory sessionFactory)
Deprecated. 

Hibernate3GpsDevice

public Hibernate3GpsDevice(String name,
                           Configuration configuration)
Deprecated. 
Method Detail

setSessionFactory

public void setSessionFactory(SessionFactory sessionFactory)
Deprecated. 

setConfiguration

public void setConfiguration(Configuration configuration)
Deprecated. 

setMirrorFilter

public void setMirrorFilter(HibernateMirrorFilter mirrorFilter)
Deprecated. 
Sets a mirroring filter that can filter hibernate mirror events. If no mirror filter is set no filtering will happen.

Parameters:
mirrorFilter - The mirror filter handler

doStart

protected void doStart()
                throws CompassGpsException
Deprecated. 
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
Deprecated. 
Description copied from class: AbstractGpsDevice
Derived devices can implement it in case of stop event notification.

Overrides:
doStop in class AbstractGpsDevice
Throws:
CompassGpsException

doGetActualSessionFactory

protected SessionFactory doGetActualSessionFactory()
Deprecated. 
A helper method that returns the actual session factory for event registration. Can be used by subclasses if the SessionFactory is proxied.


isMirrorDataChanges

public boolean isMirrorDataChanges()
Deprecated. 
Description copied from interface: MirrorDataChangesGpsDevice
Should the device perform real time data mirroring.

Specified by:
isMirrorDataChanges in interface MirrorDataChangesGpsDevice
Returns:
true if the device mirror data changes

setMirrorDataChanges

public void setMirrorDataChanges(boolean mirrorDataChanges)
Deprecated. 
Description copied from interface: MirrorDataChangesGpsDevice
Sets if the device will perform real time data changes mirroring.

Specified by:
setMirrorDataChanges in interface MirrorDataChangesGpsDevice
Parameters:
mirrorDataChanges - Should the device mirror data changes

isIgnoreMirrorExceptions

public boolean isIgnoreMirrorExceptions()
Deprecated. 
Should exceptions be ignored during the mirroring operations (the Hibernate event listeners). Defaults to false.


setIgnoreMirrorExceptions

public void setIgnoreMirrorExceptions(boolean ignoreMirrorExceptions)
Deprecated. 
Should exceptions be ignored during the mirroring operations (the Hibernate event listeners). Defaults to false.


doGetHibernateSessionWrapper

protected AbstractHibernateGpsDevice.HibernateSessionWrapper doGetHibernateSessionWrapper()
Deprecated. 
Specified by:
doGetHibernateSessionWrapper in class AbstractHibernateGpsDevice

doGetHibernateEntitiesInfo

protected HibernateEntityInfo[] doGetHibernateEntitiesInfo()
                                                    throws HibernateGpsDeviceException
Deprecated. 
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
Deprecated. 
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

doGetQuery

protected Query doGetQuery(HibernateEntityInfo info,
                           Session session)
Deprecated. 
Can be used to override query creation for a certain hibernate entity info.


isInherited

protected boolean isInherited(ClassMetadata classMetadata)
                       throws HibernateGpsDeviceException
Deprecated. 
Throws:
HibernateGpsDeviceException


Copyright (c) 2004-2008 The Compass Project.