Class AbstractCachingCannedQueryFactory<R>

java.lang.Object
org.alfresco.query.AbstractCannedQueryFactory<R>
org.alfresco.query.AbstractCachingCannedQueryFactory<R>
All Implemented Interfaces:
CannedQueryFactory<R>, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.InitializingBean

public abstract class AbstractCachingCannedQueryFactory<R> extends AbstractCannedQueryFactory<R>
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
Author:
Derek Hulley
  • Constructor Details

    • AbstractCachingCannedQueryFactory

      public AbstractCachingCannedQueryFactory()
  • Method Details

    • getCannedQuery

      public final CannedQuery<R> 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<R> 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