public class OCLQueryDelegate extends Object
OCLQueryDelegateFactory
Constructor and Description |
---|
OCLQueryDelegate(OCLDelegateDomain delegateDomain,
EClassifier context,
Map<String,EClassifier> parameters,
String expression)
Initializes me with my domain, context, variables, and expression.
|
Modifier and Type | Method and Description |
---|---|
Object |
execute(Object target,
Map<String,?> arguments)
Executes the query for the specified target object.
|
void |
prepare()
Prepares the query wrapping any exceptions as InvocationTargetException.
|
String |
toString() |
public OCLQueryDelegate(OCLDelegateDomain delegateDomain, EClassifier context, Map<String,EClassifier> parameters, String expression)
delegateDomain
- my domaincontext
- my contextparameters
- name and types of variables used in my expressionexpression
- the expression that I handleParserException
- if the expression is invalidpublic Object execute(Object target, Map<String,?> arguments) throws InvocationTargetException
target
- the object on which to execute the query; this must be an
instance of the context with which the delegate was createdarguments
- a map of variable names to values; these must correspond to
the variables with which the delegate was createdInvocationTargetException
- in case of failure to prepare or execute the query, usually
because of an exceptionpublic void prepare() throws InvocationTargetException
InvocationTargetException
- wrapping any parser, io exceptionsCopyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.