Package org.eclipse.emf.cdo.server.ocl
Class OCLQueryHandler
java.lang.Object
org.eclipse.emf.cdo.server.ocl.OCLQueryHandler
- All Implemented Interfaces:
IQueryHandler
A
query handler
that evaluates OCL query expressions.- Author:
- Eike Stepper
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static final class
An abstraction of theclassifier
and/orobject
of an OCL query context parameter.static class
CreatesOCLQueryHandler
instances.Nested classes/interfaces inherited from interface org.eclipse.emf.cdo.server.IQueryHandler
IQueryHandler.PotentiallySlow
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addEnvironmentVariable
(org.eclipse.ocl.Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> environment, org.eclipse.ocl.expressions.Variable<EClassifier, ?> variable) protected boolean
addResult
(Object result, IQueryContext context, CDOView view) protected CDOExtentMap
createExtentMap
(CDOView view, CDOChangeSetData changeSetData, IQueryContext context) protected org.eclipse.ocl.expressions.OCLExpression<EClassifier>
createInitExpression
(org.eclipse.ocl.types.OCLStandardLibrary<EClassifier> stdLib, CDOPackageRegistry packageRegistry, Object value) protected org.eclipse.ocl.OCL<?,
EClassifier, ?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> createOCL
(CDOView view, CDOExtentMap extentMap) protected org.eclipse.ocl.Query<EClassifier,
EClass, EObject> createQuery
(CDOView view, CDOQueryInfo info, OCLQueryHandler.ContextParameter contextParameter, org.eclipse.ocl.OCL<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> ocl) protected boolean
protected Object
evaluate
(org.eclipse.ocl.Query<EClassifier, EClass, EObject> query, EObject object) void
executeQuery
(CDOQueryInfo info, IQueryContext context) Executes thequery
represented by the specifiedquery info
bypassing
the query results to the query execution engine represented by the specifiedexecution context
.protected EClassifier
getArbitraryContextClassifier
(CDOPackageRegistry packageRegistry) Deprecated.As of 4.2 no longer supported.protected OCLQueryHandler.ContextParameter
getContextParameter
(CDOQueryInfo info, CDOView view) protected EClass
protected CDORevision
getRevision
(EObject object, CDOView view) protected void
initEnvironment
(org.eclipse.ocl.Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> environment, CDOPackageRegistry packageRegistry, Map<String, Object> parameters) protected boolean
isOCLQueryParameter
(String name) static void
prepareContainer
(org.eclipse.net4j.util.container.IManagedContainer container) protected boolean
readParameter
(Map<String, ?> queryParameters, String name, boolean defaultValue) protected <T> T
readParameter
(Map<String, ?> queryParameters, String name, Class<T> type, T defaultValue) protected void
readParameters
(Map<String, ?> queryParameters) protected void
setOCLQueryParameters
(Map<String, Object> parameters, org.eclipse.ocl.Query<EClassifier, EClass, EObject> query)
-
Field Details
-
LANGUAGE_NAME
- See Also:
-
LAZY_EXTENTS_PARAMETER
- Since:
- 4.1
- See Also:
-
IMPLICIT_ROOT_CLASS_PARAMETER
Query parameter indicating theEClass
to set as the implicit root class of the type hierarchy. The default isnull
.- Since:
- 4.2
- See Also:
-
-
Constructor Details
-
OCLQueryHandler
public OCLQueryHandler()
-
-
Method Details
-
executeQuery
Description copied from interface:IQueryHandler
Executes thequery
represented by the specifiedquery info
bypassing
the query results to the query execution engine represented by the specifiedexecution context
.- Specified by:
executeQuery
in interfaceIQueryHandler
-
addResult
-
getRevision
-
evaluate
-
createExtentMap
protected CDOExtentMap createExtentMap(CDOView view, CDOChangeSetData changeSetData, IQueryContext context) -
createsLazyExtents
protected boolean createsLazyExtents() -
createOCL
protected org.eclipse.ocl.OCL<?,EClassifier, createOCL?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> (CDOView view, CDOExtentMap extentMap) - Since:
- 4.2
-
createQuery
protected org.eclipse.ocl.Query<EClassifier,EClass, createQueryEObject> (CDOView view, CDOQueryInfo info, OCLQueryHandler.ContextParameter contextParameter, org.eclipse.ocl.OCL<?, EClassifier, throws org.eclipse.ocl.ParserException, DiagnosticException?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> ocl) - Throws:
org.eclipse.ocl.ParserException
DiagnosticException
- Since:
- 4.2
-
getArbitraryContextClassifier
Deprecated.As of 4.2 no longer supported. -
initEnvironment
protected void initEnvironment(org.eclipse.ocl.Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> environment, CDOPackageRegistry packageRegistry, Map<String, Object> parameters) -
getImplicitRootClass
- Since:
- 4.2
-
createInitExpression
protected org.eclipse.ocl.expressions.OCLExpression<EClassifier> createInitExpression(org.eclipse.ocl.types.OCLStandardLibrary<EClassifier> stdLib, CDOPackageRegistry packageRegistry, Object value) -
addEnvironmentVariable
protected void addEnvironmentVariable(org.eclipse.ocl.Environment<?, EClassifier, ?, ?, ?, ?, ?, ?, ?, org.eclipse.ocl.ecore.Constraint, EClass, EObject> environment, org.eclipse.ocl.expressions.Variable<EClassifier, ?> variable) -
getContextParameter
- Since:
- 4.2
-
readParameters
- Since:
- 4.2
-
readParameter
- Since:
- 4.2
-
readParameter
protected <T> T readParameter(Map<String, ?> queryParameters, String name, Class<T> type, T defaultValue) - Since:
- 4.2
-
setOCLQueryParameters
protected void setOCLQueryParameters(Map<String, Object> parameters, org.eclipse.ocl.Query<EClassifier, EClass, EObject> query) - Since:
- 4.2
-
isOCLQueryParameter
- Since:
- 4.2
-
prepareContainer
public static void prepareContainer(org.eclipse.net4j.util.container.IManagedContainer container)
-