public class RunOnceQueryEngine extends java.lang.Object implements IRunOnceQueryEngine
Notifier
as scope and a base index options
that specifically allows traversing derived features that are not well-behaving.Constructor and Description |
---|
RunOnceQueryEngine(org.eclipse.emf.common.notify.Notifier notifier)
Creates a run-once query engine on the given notifier.
|
Modifier and Type | Method and Description |
---|---|
<Match extends IPatternMatch> |
getAllMatches(IQuerySpecification<? extends IncQueryMatcher<Match>> querySpecification)
Returns the set of all matches for the given query in the scope of the engine.
|
BaseIndexOptions |
getBaseIndexOptions()
The base index options specifies how the base index is built, including wildcard mode (defaults to false) and
dynamic EMF mode (defaults to false).
|
org.eclipse.emf.common.notify.Notifier |
getScope() |
void |
resampleOnNextCall()
If automatic resampling is enabled and the value of derived features may change without model modifications,
calling this method will make sure that re-sampling will occur before returning match results.
|
void |
setAutomaticResampling(boolean automaticResampling)
When set to true, the run-once query engine will not dispose it's engine and will resample the values of derived
features before returning matches if the model changed since the last call.
|
public RunOnceQueryEngine(org.eclipse.emf.common.notify.Notifier notifier)
public <Match extends IPatternMatch> java.util.Collection<Match> getAllMatches(IQuerySpecification<? extends IncQueryMatcher<Match>> querySpecification) throws IncQueryException
IRunOnceQueryEngine
getAllMatches
in interface IRunOnceQueryEngine
querySpecification
- the query that is evaluatedIncQueryException
public BaseIndexOptions getBaseIndexOptions()
IRunOnceQueryEngine
NavigationHelper
for the explanation of wildcard mode and
dynamic EMF mode.
The returned options can be modified in order to affect subsequent calls of IRunOnceQueryEngine.getAllMatches(org.eclipse.incquery.runtime.api.IQuerySpecification<? extends org.eclipse.incquery.runtime.api.IncQueryMatcher<Match>>)
.getBaseIndexOptions
in interface IRunOnceQueryEngine
public org.eclipse.emf.common.notify.Notifier getScope()
getScope
in interface IRunOnceQueryEngine
public void setAutomaticResampling(boolean automaticResampling)
IRunOnceQueryEngine
IRunOnceQueryEngine.resampleOnNextCall()
before subsequent calls of IRunOnceQueryEngine.getAllMatches(org.eclipse.incquery.runtime.api.IQuerySpecification<? extends org.eclipse.incquery.runtime.api.IncQueryMatcher<Match>>)
.setAutomaticResampling
in interface IRunOnceQueryEngine
public void resampleOnNextCall()
IRunOnceQueryEngine
resampleOnNextCall
in interface IRunOnceQueryEngine