public interface Query<C,CLS,E>
See the Environment class for a description of the
generic type parameters of this class.
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(List<?> objects)
Determines whether all of the input objects satisfy the query.
|
boolean |
check(Object obj)
Evaluates the query on an object.
|
Object |
evaluate()
Evaluates the query.
|
List<?> |
evaluate(List<?> objects)
Evaluates the query on the input list.
|
Object |
evaluate(Object obj)
Evaluates the query on the object.
|
EvaluationEnvironment<C,?,?,CLS,E> |
getEvaluationEnvironment()
Obtains the evaluation environment that I use to evaluate OCL expressions.
|
OCLExpression<C> |
getExpression()
Obtains the expression that I evaluate (or check as a boolean constraint).
|
Map<CLS,? extends Set<? extends E>> |
getExtentMap()
Obtains the mapping of classes to their extents (sets of all instances).
|
String |
queryText()
Translates the query back to an OCL text string.
|
<T> List<T> |
reject(List<T> objects)
Determines the subset of input objects that do not satisfy the
query.
|
C |
resultType()
Obtains the OCL result type of the query.
|
<T> List<T> |
select(List<T> objects)
Determines the subset of input objects that satisfy the query.
|
EvaluationEnvironment<C,?,?,CLS,E> getEvaluationEnvironment()
Object evaluate(Object obj)
obj - an ObjectEObjects, Java objects, a mixture, or even null.
In any case, the results conform to the expression's
result typeevaluate(),
evaluate(List),
resultType()Object evaluate()
allInstances()
exclusively for evaluation.EObjects, Java objects, a mixture, or even null.
In any case, the results conform to the expression's
result typeresultType()boolean check(Object obj)
obj - an Object or null if the query
does not require an OCL 'self' contexttrue or false according to
whether the constraint is metcheck(List)List<?> evaluate(List<?> objects)
objects - a list of objects to evaluate the query onobjects. 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 typeevaluate(Object),
resultType()boolean check(List<?> objects)
objects - a list of objects to evaluate the constraint ontrue if all of the objects satisfy
the constraint (including the trivial case of an empty input list);
false, otherwisecheck(Object)<T> List<T> select(List<T> objects)
objects - a list of objects to evaluate the constraint onobjects that
satisfy the constraint<T> List<T> reject(List<T> objects)
objects - a list of objects to evaluate the constraint onobjects that
do not satisfy the constraintC resultType()
Boolean.String queryText()
Map<CLS,? extends Set<? extends E>> getExtentMap()
OCL.setExtentMap(java.util.Map<CLS, ? extends java.util.Set<? extends E>>)OCLExpression<C> getExpression()
Copyright © 2015 Open eHealth Foundation. All rights reserved.