org.eclipse.emf.ocl.query
Interface Query

All Superinterfaces:
EObject, Notifier
All Known Implementing Classes:
QueryImpl

Deprecated. Use the Query interface with the OCL class, instead.

@Deprecated
public interface Query
extends EObject

An OCL constraint or query. The query is validated for correctness when it is created. The query can subsequently be evaluated on a single object or on multiple objects in one operation.


Field Summary
static String copyright
          Deprecated.  
 
Method Summary
 boolean check(List objects)
          Deprecated. Determines whether all of the input objects satisfy the query.
 boolean check(Object obj)
          Deprecated. Evaluates the query on an object.
 Object evaluate()
          Deprecated. Evaluates the query.
 List evaluate(List objects)
          Deprecated. Evaluates the query on the input list.
 Object evaluate(Object obj)
          Deprecated. Evaluates the query on the object.
 EvaluationEnvironment getEvaluationEnvironment()
          Deprecated. Obtains the evaluation environment that I use to evaluate OCL expressions.
 OCLExpression getExpression()
          Deprecated. Returns the value of the 'Expression' reference
 Map getExtentMap()
          Deprecated. Obtains the mapping of EClassifiers representing OCL types to their extents (set of all instances).
 String queryText()
          Deprecated. Translates the query back to an OCL text string.
 List reject(List objects)
          Deprecated. Determines the subset of input objects that do not satisfy the query.
 EClassifier resultType()
          Deprecated. Obtains the OCL result type of the query.
 List select(List objects)
          Deprecated. Determines the subset of input objects that satisfy the query.
 void setEvaluationEnvironment(EvaluationEnvironment env)
          Deprecated. Sets the evaluation environment that I use to evaluate OCL expressions.
 void setExtentMap(Map extentMap)
          Deprecated. Sets the mapping of EClassifiers representing OCL types to their extents (set of all instances).
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Field Detail

copyright

static final String copyright
Deprecated. 

See Also:
Constant Field Values
Method Detail

setEvaluationEnvironment

void setEvaluationEnvironment(EvaluationEnvironment env)
Deprecated. 
Sets the evaluation environment that I use to evaluate OCL expressions.

Parameters:
env - my environment

getEvaluationEnvironment

EvaluationEnvironment getEvaluationEnvironment()
Deprecated. 
Obtains the evaluation environment that I use to evaluate OCL expressions.

Returns:
my environment

evaluate

Object evaluate(Object obj)
Deprecated. 
Evaluates the query on the object.

Parameters:
obj - an Object
Returns:
the result of the query, which may be one or more EObjects, Java objects, a mixture, or even null. In any case, the results conform to the expression's result type
See Also:
evaluate(), evaluate(List), resultType()

evaluate

Object evaluate()
Deprecated. 
Evaluates the query. This method is used when there is no 'self' context required by the query. Either the query is constant, or uses allInstances() exclusively for evaluation.

Returns:
the result of the query, which may be one or more EObjects, Java objects, a mixture, or even null. In any case, the results conform to the expression's result type
See Also:
resultType()

check

boolean check(Object obj)
Deprecated. 
Evaluates the query on an object. The query must be a boolean valued constraint.

Parameters:
obj - an Object or null if the query does not require an OCL 'self' context
Returns:
boolean true or false according to whether the constraint is met
See Also:
check(List)

evaluate

List evaluate(List objects)
Deprecated. 
Evaluates the query on the input list. The results are returned in a corresponding list of results.

Parameters:
objects - a list of objects to evaluate the query on
Returns:
a list of results, corresponding one-for-one with the objects. Note that result elements may, themselves, be collections of multiple results for a single input object. In any case, the results conform to the expression's result type
See Also:
evaluate(Object), resultType()

check

boolean check(List objects)
Deprecated. 
Determines whether all of the input objects satisfy the query. The query must be a boolean-valued constraint.

Parameters:
objects - a list of objects to evaluate the constraint on
Returns:
true if all of the objects satisfy the constraint (including the trivial case of an empty input list); false, otherwise
See Also:
check(Object)

select

List select(List objects)
Deprecated. 
Determines the subset of input objects that satisfy the query. The query must be a boolean valued constraint.

Parameters:
objects - a list of objects to evaluate the constraint on
Returns:
the subset (possibly empty) of the objects that satisfy the constraint

reject

List reject(List objects)
Deprecated. 
Determines the subset of input objects that do not satisfy the query. The query must be a boolean valued constraint.

Parameters:
objects - a list of objects to evaluate the constraint on
Returns:
the subset (possibly empty) of the objects that do not satisfy the constraint

resultType

EClassifier resultType()
Deprecated. 
Obtains the OCL result type of the query. This may be an EClassifier in the user metamodel, or it may represent a core Java language type (such as Boolean in the case of constraints) or an OCL data type.

Returns:
the query's result type

queryText

String queryText()
Deprecated. 
Translates the query back to an OCL text string.

Returns:
the text of the OCL query expression

getExtentMap

Map getExtentMap()
Deprecated. 
Obtains the mapping of EClassifiers representing OCL types to their extents (set of all instances).

Returns:
the map of classifiers (EClassifier) to their extents (List)
See Also:
setExtentMap(Map)

getExpression

OCLExpression getExpression()
Deprecated. 
Returns the value of the 'Expression' reference.

If the meaning of the 'Expression' reference isn't clear, there really should be more of a description here...

Returns:
the value of the 'Expression' reference.
See Also:
QueryPackage.getQuery_Expression()

setExtentMap

void setExtentMap(Map extentMap)
Deprecated. 
Sets the mapping of EClassifiers representing OCL types to their extents (set of all instances).

Parameters:
extentMap - a map of classifiers (EClassifier) to their extents (List)
See Also:
getExtentMap()

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.