org.eclipse.gmt.modisco.infra.query.core

## Class AbstractModelQuery

- java.lang.Object
- - org.eclipse.gmt.modisco.infra.query.core.AbstractModelQuery

Direct Known Subclasses:
  JXPathModelQueryAdapter

Deprecated.
replaced by EMF Facet, cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=470578

    @Deprecated
    public abstract class AbstractModelQuery
    extends java.lang.Object

To get a sub class instance of this class, the `ModelQuerySetCatalog` must be used.

     ModelQuerySetCatalog catalog = ModelQuerySetCatalog.getSingleton();
     ModelQuerySet modelQuerySet = catalog.getModelQuerySet("modisco.infra.query.tests.01");
     ModelQuery modelQuery = modelQuerySet.getQuery("test001");
     AbstractModelQuery modelQueryInst = catalog.getModelQueryImpl(modelQuery);

Author:
  Gregoire DUPE (Mia-Software)

### Constructor Summary

Constructors
Constructor and Description
`AbstractModelQuery(ModelQuery modelQuery)` Deprecated. AbstractModelQuery constructor

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods
`java.lang.Object` `basicEvaluate(EObject context)` Deprecated. This method is equivalent to `evaluate(EObject)` but rather than return the errors into a ModelQueryResult instance, it throws an exception.
`abstract java.lang.Object` `basicEvaluate(EObject context, java.util.List<ModelQueryParameterValue> parameterValues)` Deprecated. This method must be overridden by each sub class to implement query evaluation.
`ModelQueryResult` `evaluate(EObject context)` Deprecated. This method is used to evaluate the query on one model element.
`ModelQueryResult` `evaluate(EObject context, java.util.List<ModelQueryParameterValue> parameterValues)` Deprecated. This method is used to evaluate the query on one model element.
`java.util.List<ModelQueryResult>` `evaluate(ModelQueryContext context, java.util.List<ModelQueryParameterValue> parameterValues)` Deprecated. This method is used to evaluate the query on a set of models and model elements described by the context parameter.
`ModelQuery` `getModelQuery()` Deprecated. This method returns the model query element passed as parameter to the constructor
`void` `setCheckResult(boolean checkResult)` Deprecated.
`java.lang.String` `toString()` Deprecated.

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

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### AbstractModelQuery

    public AbstractModelQuery(ModelQuery modelQuery)

Deprecated.
AbstractModelQuery constructor

Parameters:
  `modelQuery` - the model query description (model element)

### Method Detail

#### getModelQuery

    public final ModelQuery getModelQuery()

Deprecated.
This method returns the model query element passed as parameter to the constructor

Returns:
  The model query element passed as parameter to the constructor

#### evaluate

    public final java.util.List<ModelQueryResult> evaluate(ModelQueryContext context,
                                                           java.util.List<ModelQueryParameterValue> parameterValues)

Deprecated.
This method is used to evaluate the query on a set of models and model elements described by the context parameter. The query is evaluated on each contextually referred model element and on each element of a contextually referred model.

Parameters:
  `context` - The query evaluation context described by a ModelQueryContext instance.
  `parameterValues` - The query parameter values.
Returns:
  A list of ModelQueryResult (one per evaluation)

#### evaluate

    public final ModelQueryResult evaluate(EObject context)

Deprecated.
This method is used to evaluate the query on one model element. The method is only usable for queries which do not have any parameters.

Parameters:
  `context` - The query evaluation context
Returns:
  A ModelQueryResult instance

#### evaluate

    public final ModelQueryResult evaluate(EObject context,
                                           java.util.List<ModelQueryParameterValue> parameterValues)

Deprecated.
This method is used to evaluate the query on one model element. The method is usable for queries which have parameters.

Parameters:
  `context` - The query evaluation context
  `parameterValues` - The query parameter values
Returns:
  A ModelQueryResult instance

#### basicEvaluate

    public abstract java.lang.Object basicEvaluate(EObject context,
                                                   java.util.List<ModelQueryParameterValue> parameterValues)
                                            throws ModelQueryException

Deprecated.
This method must be overridden by each sub class to implement query evaluation.

Parameters:
  `context` - The query evaluation context
  `parameterValues` - The query parameter values
Returns:
  A list of ModelQueryResult (one per evaluation)
Throws:
  `ModelQueryExecutionException`
  `ModelQueryException`

#### basicEvaluate

    public final java.lang.Object basicEvaluate(EObject context)
                                         throws ModelQueryException

Deprecated.
This method is equivalent to `evaluate(EObject)` but rather than return the errors into a ModelQueryResult instance, it throws an exception.

Parameters:
  `context` - The query evaluation context
Returns:
  The query result.
Throws:
  `ModelQueryExecutionException`
  `ModelQueryException`

#### setCheckResult

    public void setCheckResult(boolean checkResult)

Deprecated.

#### toString

    public java.lang.String toString()

Deprecated.

Overrides:
  `toString` in class `java.lang.Object`