Q
- The queryR
- The query resultpublic interface DataSourceFactory<Q extends Query,R extends QueryResult>
Modifier and Type | Method and Description |
---|---|
Q |
buildQuery(String id,
String type,
String name,
String description,
Query.ResultType resultType,
String dataSourceId,
Map<String,String> additionalConfiguration)
Build a query with the specified information.
|
R |
execute(Q query,
Map<String,String> parameterValues)
Execute the query with the specified parameter values.
|
R |
execute(Q query,
Map<String,String> parameterValues,
int offset,
int limit)
Execute the query with the specified parameter values.
|
Collection<DataSourceClientInteraction.DataSourceType> |
getHandledTypes()
Get the types that the factory can build.
|
Collection<String> |
getQueryConfigurationParameters(String type)
The configuration parameters needed to build a Query of the specified type.
|
Collection<DataSourceClientInteraction.DataSourceType> getHandledTypes()
Collection<String> getQueryConfigurationParameters(String type)
type
- the type of the Query.Q buildQuery(String id, String type, String name, String description, Query.ResultType resultType, String dataSourceId, Map<String,String> additionalConfiguration) throws DataInclusionException
id
- the Query ID.type
- the Query type.name
- the Query name.description
- the Query description.resultType
- the Query result type (single/multiple).dataSourceId
- the id of data sourceadditionalConfiguration
- additional query configuration parameter values as a Map<parameterName, parameterValue>.DataInclusionException
- if an error occurs trying to create the Query.R execute(Q query, Map<String,String> parameterValues) throws DataInclusionException
query
- The queryparameterValues
- the parameter values as a Map (name -> value).DataInclusionException
- if an error occurs while executing the queryR execute(Q query, Map<String,String> parameterValues, int offset, int limit) throws DataInclusionException
query
- The queryparameterValues
- the parameter values as a Map (name -> value).offset
- The start index of searchlimit
- The max number of result to returnDataInclusionException
- if an error occurs while executing the query