org.eclipse.viatra.query.runtime.api.scope

## Class QueryScope

- java.lang.Object
- - org.eclipse.viatra.query.runtime.internal.apiimpl.EngineContextFactory
  - - org.eclipse.viatra.query.runtime.api.scope.QueryScope

- Direct Known Subclasses:
    EMFScope, TabularIndexHost.TabularIndexScope

      public abstract class QueryScope
      extends org.eclipse.viatra.query.runtime.internal.apiimpl.EngineContextFactory

  Defines a scope for a VIATRA Query engine, which determines the set of model elements that query evaluation operates on.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QueryScope()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isCompatibleWithQueryScope(java.lang.Class<? extends QueryScope> queryScopeClass)` Determines whether a query engine initialized on this scope can evaluate queries formulated against the given scope type.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.internal.apiimpl.EngineContextFactory

      `createEngineContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### QueryScope

          public QueryScope()

  - ### Method Detail

    - #### isCompatibleWithQueryScope

          public boolean isCompatibleWithQueryScope(java.lang.Class<? extends QueryScope> queryScopeClass)

      Determines whether a query engine initialized on this scope can evaluate queries formulated against the given scope type.

      Every query scope class is compatible with a query engine initialized on a scope of the same class or a subclass.

      Parameters:
        `queryScopeClass` - the scope class returned by invoking `IQuerySpecification.getPreferredScopeClass()` on a query specification
      Returns:
        true if an `ViatraQueryEngine` initialized on this scope can consume an `IQuerySpecification`