public class ExpressionQuery<T> extends Object implements IQueryWithIndex<T>
Constructor and Description |
---|
ExpressionQuery(Class<? extends T> elementClass,
IExpression expression,
Object... parameters) |
ExpressionQuery(Class<? extends T> matchingClass,
String expression,
Object... parameters) |
Modifier and Type | Method and Description |
---|---|
static <T> IContextExpression<T> |
createExpression(IQuery<T> query) |
Class<? extends T> |
getElementClass() |
static <T> Class<? extends T> |
getElementClass(IQuery<T> query) |
IContextExpression<T> |
getExpression()
Returns the IExpression backing this query or
null if
this is not an expression query. |
IQueryResult<T> |
perform(IIndexProvider<T> indexProvider)
Evaluates the query using the
indexProvider . |
IQueryResult<T> |
perform(Iterator<T> iterator)
Evaluates the query for a specific input.
|
public ExpressionQuery(Class<? extends T> elementClass, IExpression expression, Object... parameters)
public IQueryResult<T> perform(IIndexProvider<T> indexProvider)
IQueryWithIndex
indexProvider
. The query
is first analyzed for index candidates (typically expressions like
id == <some value>) and if possible, indexes returned by
IIndexProvider.getIndex(String)
will be used
in place of the iterator returned by IIndexProvider.everything()
.perform
in interface IQueryWithIndex<T>
indexProvider
- The provider of the material to evaluate the query onpublic IQueryResult<T> perform(Iterator<T> iterator)
IQuery
public IContextExpression<T> getExpression()
IQuery
null
if
this is not an expression query.getExpression
in interface IQuery<T>
null
.public static <T> IContextExpression<T> createExpression(IQuery<T> query)
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.