org.alfresco.query
Class AbstractCachingCannedQueryFactory

java.lang.Object
  extended by org.alfresco.query.AbstractCannedQueryFactory
      extended by org.alfresco.query.AbstractCachingCannedQueryFactory
All Implemented Interfaces:
CannedQueryFactory, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

public abstract class AbstractCachingCannedQueryFactory
extends AbstractCannedQueryFactory

Caching support extension for CannedQueryFactory implementations.

Depending on the parameters provided, this class may choose to pick up existing results and re-use them for later page requests; the client will not have knowledge of the shortcuts. TODO: This is work-in-progress

Since:
4.0

Constructor Summary
AbstractCachingCannedQueryFactory()
           
 
Method Summary
 CannedQuery getCannedQuery(CannedQueryParameters parameters)
          Base implementation that provides a caching facade around the query.
protected abstract  CannedQuery getCannedQueryImpl(CannedQueryParameters parameters)
          Derived classes must implement this method to provide the raw query that supports the given parameters.
 
Methods inherited from class org.alfresco.query.AbstractCannedQueryFactory
afterPropertiesSet, getCannedQuery, getQueryExecutionId, setBeanName, setRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCachingCannedQueryFactory

public AbstractCachingCannedQueryFactory()
Method Detail

getCannedQuery

public final CannedQuery getCannedQuery(CannedQueryParameters parameters)
Base implementation that provides a caching facade around the query.

Parameters:
parameters - the full query parameters
Returns:
a decoraded facade query that will cache query results for later paging requests

getCannedQueryImpl

protected abstract CannedQuery getCannedQueryImpl(CannedQueryParameters parameters)
Derived classes must implement this method to provide the raw query that supports the given parameters. All requests must be serviced without any further caching in order to prevent duplicate caching.

Parameters:
parameters - the query parameters as given by the client
Returns:
the query that will generate the results


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.