Package org.alfresco.query
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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal CannedQuery<R>
getCannedQuery
(CannedQueryParameters parameters) Base implementation that provides a caching facade around the query.protected abstract CannedQuery<R>
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
-
Constructor Details
-
AbstractCachingCannedQueryFactory
public AbstractCachingCannedQueryFactory()
-
-
Method Details
-
getCannedQuery
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
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
-