public class QueryImpl extends Object implements Query, ProblemAware
| Constructor and Description |
|---|
QueryImpl(OCL ocl,
ExpressionInOCL query) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkBoxed(Iterable<?> boxedObjects)
Determines whether all of the boxedObjects satisfy the query.
|
boolean |
checkBoxed(Object boxedObject)
Evaluates the query on a boxedObject.
|
boolean |
checkEcore(Iterable<?> ecoreObjects)
Determines whether all of the ecoreObjects satisfy the query.
|
boolean |
checkEcore(Object ecoreObject)
Evaluates the query on an ecoreObject.
|
List<?> |
evaluateBoxed(Iterable<?> boxedObjects)
Evaluates the query on each of boxedObjects to return a list of boxedResults.
|
Object |
evaluateBoxed(Object boxedValue)
Evaluates the query on the boxedObject to return a boxedResult.
|
<any> |
evaluateEcore(Class<?> instanceClass,
Iterable<?> ecoreObjects)
Evaluates the query on each of ecoreObjects to return a list of ecoreResults coerced, if non-null, to instanceClass.
|
Object |
evaluateEcore(Class<?> instanceClass,
Object ecoreObject)
Evaluates the query on the ecoreObject to return an ecoreResult coerced, if non-null, to instanceClass.
|
<any> |
evaluateEcore(Iterable<?> ecoreObjects)
Evaluates the query on each of ecoreObjects to return a list of ecoreResults using Integer/Double for numerics.
|
Object |
evaluateEcore(Object ecoreObject)
Evaluates the query on the ecoreObject to return an ecoreResult using Integer/Double for numerics.
|
Object |
evaluateUnboxed(Object unboxedObject)
Evaluates the query on the unboxedObject to return an unboxedResult.
|
EvaluationEnvironment |
getEvaluationEnvironment(Object unboxedObject)
Obtains the evaluation environment that I use to evaluate OCL expressions.
|
OCLExpression |
getExpression()
Obtains the expression that I evaluate (or check as a boolean constraint).
|
OCL |
getOCL()
Obtains the
OCL that created me. |
Diagnostic |
getProblems()
Retrieves the problems available on this problem aware object
|
String |
queryText()
Translates the query back to an OCL text string.
|
<T> List<T> |
rejectEcore(Iterable<T> ecoreObjects)
Determines the subset of ecoreObjects that do not satisfy the
query.
|
Type |
resultType()
Obtains the OCL result type of the query.
|
<T> List<T> |
selectEcore(Iterable<T> ecoreObjects)
Determines the subset of ecoreObjects that satisfy the query.
|
String |
toString() |
public QueryImpl(OCL ocl, ExpressionInOCL query)
public boolean checkBoxed(Object boxedObject)
QuerycheckBoxed in interface QueryboxedObject - an Object or null if the query
does not require an OCL 'self' contexttrue or false according to
whether the constraint is metpublic boolean checkBoxed(Iterable<?> boxedObjects)
QuerycheckBoxed in interface QueryboxedObjects - 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, otherwisepublic boolean checkEcore(Object ecoreObject)
QuerycheckEcore in interface QueryecoreObject - an Object or null if the query
does not require an OCL 'self' contexttrue or false according to
whether the constraint is metpublic boolean checkEcore(Iterable<?> ecoreObjects)
QuerycheckEcore in interface QueryecoreObjects - 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, otherwisepublic Object evaluateBoxed(Object boxedValue)
QueryevaluateBoxed in interface Querypublic List<?> evaluateBoxed(Iterable<?> boxedObjects)
QueryevaluateBoxed in interface Querypublic Object evaluateEcore(Object ecoreObject) throws EvaluationException
QueryevaluateEcore in interface QueryEvaluationExceptionpublic Object evaluateEcore(Class<?> instanceClass, Object ecoreObject) throws EvaluationException
QueryevaluateEcore in interface QueryEvaluationExceptionpublic <any> evaluateEcore(Iterable<?> ecoreObjects) throws EvaluationException
QueryevaluateEcore in interface QueryEvaluationExceptionpublic <any> evaluateEcore(Class<?> instanceClass, Iterable<?> ecoreObjects)
QueryevaluateEcore in interface Querypublic Object evaluateUnboxed(Object unboxedObject) throws EvaluationException
QueryevaluateUnboxed in interface QueryEvaluationExceptionpublic EvaluationEnvironment getEvaluationEnvironment(Object unboxedObject)
QuerygetEvaluationEnvironment in interface Querypublic OCLExpression getExpression()
QuerygetExpression in interface Querypublic OCL getOCL()
Query
Obtains the OCL that created me.
public Diagnostic getProblems()
ProblemAwaregetProblems in interface ProblemAwarenull in case that no problems are available.public String queryText()
Querypublic <T> List<T> rejectEcore(Iterable<T> ecoreObjects)
QueryrejectEcore in interface QueryecoreObjects - a list of objects to evaluate the constraint onobjects that
do not satisfy the constraintpublic Type resultType()
QueryBoolean.resultType in interface Querypublic <T> List<T> selectEcore(Iterable<T> ecoreObjects)
QueryselectEcore in interface QueryecoreObjects - a list of objects to evaluate the constraint onobjects that
satisfy the constraintCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.