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

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
All Implemented Interfaces:
CompassGpsDevice
Direct Known Subclasses:
Hibernate2GpsDevice, Hibernate3GpsDevice

public abstract class AbstractHibernateGpsDevice
extends AbstractParallelGpsDevice

An abstract hibernate device support. Aimed to provide the base operations required by both Hiberante 2 and Hibernate 3 - the index operation.

Extends the abstract parallel gps device providing parallel index execution support.

Author:
kimchy

Nested Class Summary
static interface AbstractHibernateGpsDevice.HibernateSessionWrapper
           
 
Field Summary
protected  int fetchCount
           
 
Fields inherited from class org.compass.gps.device.AbstractGpsDevice
compassGps, log
 
Constructor Summary
AbstractHibernateGpsDevice()
           
 
Method Summary
protected abstract  HibernateEntityInfo[] doGetHibernateEntitiesInfo()
          Returns all the hibernate entity info.
protected abstract  AbstractHibernateGpsDevice.HibernateSessionWrapper doGetHibernateSessionWrapper()
           
protected  IndexEntity[] doGetIndexEntities()
          Returns all the indexed entities for this device.
protected  IndexEntitiesIndexer doGetIndexEntitiesIndexer()
          Returns an index entities indexer that knows how to index indexable entities.
protected abstract  List doGetObjects(HibernateEntityInfo info, int from, int count, AbstractHibernateGpsDevice.HibernateSessionWrapper sessionWrapper)
          Returns the data that maps to the given class info, paginated with from and count.
 void setFetchCount(int fetchCount)
           
 
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, doStart, doStop, getGps, getName, injectGps, isFilteredForIndex, isPerformingIndexOperation, isRunning, setFilteredEntitiesForIndex, setName, shouldMirrorDataChanges, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fetchCount

protected int fetchCount
Constructor Detail

AbstractHibernateGpsDevice

public AbstractHibernateGpsDevice()
Method Detail

setFetchCount

public void setFetchCount(int fetchCount)

doGetIndexEntities

protected IndexEntity[] doGetIndexEntities()
                                    throws CompassGpsException
Description copied from class: AbstractParallelGpsDevice
Returns all the indexed entities for this device.

Specified by:
doGetIndexEntities in class AbstractParallelGpsDevice
Throws:
CompassGpsException

doGetIndexEntitiesIndexer

protected IndexEntitiesIndexer doGetIndexEntitiesIndexer()
Description copied from class: AbstractParallelGpsDevice
Returns an index entities indexer that knows how to index indexable entities.

Specified by:
doGetIndexEntitiesIndexer in class AbstractParallelGpsDevice

doGetHibernateEntitiesInfo

protected abstract HibernateEntityInfo[] doGetHibernateEntitiesInfo()
                                                             throws HibernateGpsDeviceException
Returns all the hibernate entity info. Called when the device starts up.

Returns:
Hibernate class informtion
Throws:
HibernateGpsDeviceException

doGetObjects

protected abstract List doGetObjects(HibernateEntityInfo info,
                                     int from,
                                     int count,
                                     AbstractHibernateGpsDevice.HibernateSessionWrapper sessionWrapper)
                              throws HibernateGpsDeviceException
Returns the data that maps to the given class info, paginated with from and count.

Throws:
HibernateGpsDeviceException

doGetHibernateSessionWrapper

protected abstract AbstractHibernateGpsDevice.HibernateSessionWrapper doGetHibernateSessionWrapper()


Copyright (c) 2004-2008 The Compass Project.