com.raritantechnologies.searchApp.queryFilters
Class CachingQueryProcessorFilter

java.lang.Object
  extended bycom.raritantechnologies.searchApp.QueryProcessorFilter
      extended bycom.raritantechnologies.searchApp.queryFilters.CachingQueryProcessorFilter
All Implemented Interfaces:
IQueryProcessor

public class CachingQueryProcessorFilter
extends QueryProcessorFilter

Caching Search source: returns the results of the previous query if the current query is identical.

XML Configuration Template:

 <SourceType name="filteredResults" type="QueryProcessorFilterSource"
             sourceFactoryClass = "com.raritantechnologies.searchApp.QueryProcessorFilterFactory" 
             filterClass  = "com.raritantechnologies.searchApp.queryFilters.CachingQueryProcessorFilter"
             inputSource  = "[ the Input Search Source name ]"
             queryCacheKey="[ name of cache key to store current query object ]"
             resultCacheKey="[ name of cache key to store current result object ]" >

    <!-- Optional IResultMatcher to filter the cached results retrieved -->
    <ResultMatcher class="[ class of com.raritantechnologies.searchApp.IResultMatcher ]" >

    </ResultMatcher>

  </SourceType>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
 
Fields inherited from class com.raritantechnologies.searchApp.QueryProcessorFilter
theQueryProcessor
 
Constructor Summary
CachingQueryProcessorFilter()
           
 
Method Summary
 IResultSet executeQuery(java.lang.Integer queryID, ISearchFieldMap searchMap, SourceLoginInfo[] sources, OrderedMap inputParameters, java.lang.Integer pageSize, java.lang.Integer startRec)
          Base implementation executes the query then starts filter chain.
 IResultSet getCachedPage(IResultSet cachedResults, java.lang.Integer pageSize, java.lang.Integer startRec)
           
 void initialize(org.w3c.dom.Element elem)
          subclasses should override this to initialize themselves.
 
Methods inherited from class com.raritantechnologies.searchApp.QueryProcessorFilter
doExecuteQuery, filterResultSet, getQueryProcessor, getQueryProcessor, getRealSources, setNextFilter, setQueryProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingQueryProcessorFilter

public CachingQueryProcessorFilter()
Method Detail

executeQuery

public IResultSet executeQuery(java.lang.Integer queryID,
                               ISearchFieldMap searchMap,
                               SourceLoginInfo[] sources,
                               OrderedMap inputParameters,
                               java.lang.Integer pageSize,
                               java.lang.Integer startRec)
                        throws QueryProcessorException
Description copied from class: QueryProcessorFilter
Base implementation executes the query then starts filter chain.

Specified by:
executeQuery in interface IQueryProcessor
Overrides:
executeQuery in class QueryProcessorFilter
Throws:
QueryProcessorException

getCachedPage

public IResultSet getCachedPage(IResultSet cachedResults,
                                java.lang.Integer pageSize,
                                java.lang.Integer startRec)

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from class: QueryProcessorFilter
subclasses should override this to initialize themselves.

Overrides:
initialize in class QueryProcessorFilter