Class OpenJPAJpaIndexEntitiesIndexer

  extended by org.compass.gps.device.jpa.indexer.OpenJPAJpaIndexEntitiesIndexer
All Implemented Interfaces:
JpaIndexEntitiesIndexer, IndexEntitiesIndexer

public class OpenJPAJpaIndexEntitiesIndexer
extends Object
implements JpaIndexEntitiesIndexer

OpenJPA indexer that uses fetch plan to scroll the result set and index it. Performs better than JPA setFirstResult and setMaxResults especially for large result sets.


Constructor Summary
Method Summary
 void performIndex(CompassSession session, IndexEntity[] entities)
          Performs the actual indexing of the list of index entities.
 void setJpaGpsDevice(JpaGpsDevice jpaGpsDevice)
          Sets the jpa gps device for the given indexer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public OpenJPAJpaIndexEntitiesIndexer()
Method Detail


public void setJpaGpsDevice(JpaGpsDevice jpaGpsDevice)
Description copied from interface: JpaIndexEntitiesIndexer
Sets the jpa gps device for the given indexer. Called once when the device starts up.

Specified by:
setJpaGpsDevice in interface JpaIndexEntitiesIndexer


public void performIndex(CompassSession session,
                         IndexEntity[] entities)
Description copied from interface: IndexEntitiesIndexer
Performs the actual indexing of the list of index entities. Usually, an index entity represent a group of indexable content (like a certain class when using ORM, or a select statement). This method perform the fetching of the data and indexing it in Compass using the provided Compass session.

Specified by:
performIndex in interface IndexEntitiesIndexer
session - The compass session to index the data with
entities - A list of entities to perform the indexing by

Copyright (c) 2004-2008 The Compass Project.