org.compass.gps.device.jdo
Class JdoGpsDevice

java.lang.Object
  extended by org.compass.gps.device.AbstractGpsDevice
      extended by org.compass.gps.device.jdo.JdoGpsDevice
All Implemented Interfaces:
CompassGpsDevice
Direct Known Subclasses:
Jdo2GpsDevice

public class JdoGpsDevice
extends AbstractGpsDevice

A JDO device, provides support for using jdo and jdo mapping files to index a database. The path can be views as: Database <-> JDO <-> Objects <-> Compass::Gps <-> Compass::Core (Search Engine). What it means is that for every object that has both jdo and compass mappings, you will be able to index it's data, as well as real time mirroring of data changes.

The persistenceManagerFactory must be set in order to perform the index operation.

Note: Real time monitoring is only supported with JDO 2, please see Jdo2GpsDevice for more details.

Author:
kimchy

Field Summary
protected  javax.jdo.PersistenceManagerFactory persistenceManagerFactory
           
 
Fields inherited from class org.compass.gps.device.AbstractGpsDevice
compassGps, log
 
Constructor Summary
JdoGpsDevice()
           
JdoGpsDevice(String name, javax.jdo.PersistenceManagerFactory persistenceManagerFactory)
           
 
Method Summary
protected  void doIndex(CompassSession session, IndexPlan indexPlan)
          Derived devices must implement the method to perform the actual indexing operation.
protected  void doStart()
          Derived devices can implement it in case of start event notification.
 javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
           
 void setPersistenceManagerFactory(javax.jdo.PersistenceManagerFactory persistenceManagerFactory)
           
 
Methods inherited from class org.compass.gps.device.AbstractGpsDevice
buildMessage, doStop, getGps, getName, index, injectGps, isFilteredForIndex, isPerformingIndexOperation, isRunning, setFilteredEntitiesForIndex, setName, shouldMirrorDataChanges, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

persistenceManagerFactory

protected javax.jdo.PersistenceManagerFactory persistenceManagerFactory
Constructor Detail

JdoGpsDevice

public JdoGpsDevice()

JdoGpsDevice

public JdoGpsDevice(String name,
                    javax.jdo.PersistenceManagerFactory persistenceManagerFactory)
Method Detail

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

doIndex

protected void doIndex(CompassSession session,
                       IndexPlan indexPlan)
                throws CompassGpsException
Description copied from class: AbstractGpsDevice
Derived devices must implement the method to perform the actual indexing operation.

Specified by:
doIndex in class AbstractGpsDevice
Throws:
CompassGpsException

getPersistenceManagerFactory

public javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()

setPersistenceManagerFactory

public void setPersistenceManagerFactory(javax.jdo.PersistenceManagerFactory persistenceManagerFactory)


Copyright (c) 2004-2008 The Compass Project.