org.wso2.carbon.registry.core.jdbc.dataaccess
Class SQLQueryProcessor
java.lang.Object
org.wso2.carbon.registry.core.jdbc.dataaccess.SQLQueryProcessor
- All Implemented Interfaces:
- QueryProcessor
public class SQLQueryProcessor
- extends Object
- implements QueryProcessor
The query processor to execute sql queries.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataSource
protected DataSource dataSource
- DataSource of the registry database. URL handlers can access this to construct resources by
combining various tables (e.g. comments).
SQLQueryProcessor
public SQLQueryProcessor(DataAccessManager dataAccessManager)
- Initialize the sql query processor
- Parameters:
dataAccessManager
- the data access manager to be set.
executeQuery
public Collection executeQuery(Registry registry,
Resource query,
Map parameters)
throws RegistryException
- Description copied from interface:
QueryProcessor
- This method will be called when a query of a registered type is executed.
- Specified by:
executeQuery
in interface QueryProcessor
- Parameters:
registry
- the registry to execute the queryquery
- query resource, possibly containing the query stringparameters
- query parameters as name->value pairs
- Returns:
- QueryProcessor impl should map the query results to a resource and return the
resource. If the query may return multiple results it can return a collection
resource, containing the paths of individual results. Then a URL handler can be
registered to process those individual paths and return actual resulting resource.
- Throws:
RegistryException
- QueryProcessor impl should handle all exceptions and throw RegistryException if the
exception has to propagated to the client.
Copyright © 2013 WSO2 Inc. All Rights Reserved.