public class QueryProcessorManager extends Object
Constructor and Description |
---|
QueryProcessorManager(DataAccessManager dataAccessManager,
RegistryContext registryContext)
Construct a query processor manager object from the data source and registry context.
|
Modifier and Type | Method and Description |
---|---|
Collection |
executeQuery(Registry registry,
Resource queryResource,
Map parameters)
Execute a query using the query processor associated with the media type of the query.
|
QueryProcessor |
getQueryProcessor(String queryType)
Return the query processor with the given type.
|
void |
setQueryProcessor(String queryType,
QueryProcessor processor)
Registers the provided query processor with the given type.
|
public QueryProcessorManager(DataAccessManager dataAccessManager, RegistryContext registryContext) throws RegistryException
dataAccessManager
- the data access manager objectregistryContext
- registry contextRegistryException
- throws if the construction failed.public QueryProcessor getQueryProcessor(String queryType)
queryType
- the query typepublic void setQueryProcessor(String queryType, QueryProcessor processor)
queryType
- the query typeprocessor
- the query processorpublic Collection executeQuery(Registry registry, Resource queryResource, Map parameters) throws RegistryException
registry
- the registryqueryResource
- the query as a resource.parameters
- the custom parameters to be passed to the query.RegistryException
- throws if the query execution failed.Copyright © 2015 WSO2 Inc. All Rights Reserved.