org.xwiki.query
Interface QueryFilter


@Role
public interface QueryFilter

Query Filter interface. A filter can be added to a query through Query.addFilter(QueryFilter), it will be called by the QueryExecutor before the query is executed. Queries can be filtered during 2 stages:

An example of this is the org.xwiki.query.internal.UniqueDocumentFilter which transform statements in order to make them return distinct documents names and which also filters query results in order to return only those names.

Since:
4.0RC1
Version:
$Id: 3f5d18f5209aab352a1451d10de08a9c291f77df $

Method Summary
 List filterResults(List results)
          Filter a list of query results.
 String filterStatement(String statement, String language)
          Transform a query statement.
 

Method Detail

filterStatement

String filterStatement(String statement,
                       String language)
Transform a query statement. The statement can be returned without modification.

Parameters:
statement - the query statement to transform.
language - the language of the query statement.
Returns:
the transformed statement.

filterResults

List filterResults(List results)
Filter a list of query results. The result list can be returned without modification.

Parameters:
results - the original result list.
Returns:
a filtered result list.


Copyright © 2004-2013 XWiki. All Rights Reserved.