public class ExpressionMatchQuery<T> extends Object implements IMatchQuery<T>, IQueryWithIndex<T>
| Constructor and Description |
|---|
ExpressionMatchQuery(Class<? extends T> matchingClass,
IExpression expression,
Object... parameters) |
ExpressionMatchQuery(Class<? extends T> matchingClass,
String expression,
Object... parameters) |
| Modifier and Type | Method and Description |
|---|---|
IEvaluationContext |
getContext() |
IMatchExpression<T> |
getExpression()
Returns the IExpression backing this query or
null if
this is not an expression query. |
Class<? extends T> |
getMatchingClass() |
boolean |
isMatch(T candidate)
Returns whether the given object satisfies the parameters of this 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.
|
void |
postPerform() |
void |
prePerform() |
void |
setIndexProvider(IIndexProvider<T> indexProvider) |
public ExpressionMatchQuery(Class<? extends T> matchingClass, IExpression expression, Object... parameters)
public IEvaluationContext getContext()
public IQueryResult<T> perform(IIndexProvider<T> indexProvider)
IQueryWithIndexindexProvider. 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)
IQuerypublic boolean isMatch(T candidate)
IMatchQueryisMatch in interface IMatchQuery<T>candidate - The object to perform the query againsttrue if the unit satisfies the parameters
of this query, and false otherwisepublic IMatchExpression<T> getExpression()
IQuerynull if
this is not an expression query.getExpression in interface IQuery<T>null.public void setIndexProvider(IIndexProvider<T> indexProvider)
public void prePerform()
public void postPerform()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.