Class AbstractQuery
java.lang.Object
org.ametys.plugins.externaldata.data.AbstractQuery
- All Implemented Interfaces:
Query
An abstract query.
Defines getters and setters for all base members of a query, and provides some helpful methods.
Defines getters and setters for all base members of a query, and provides some helpful methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ametys.plugins.externaldata.data.Query
Query.ResultType -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe datasource id.protected StringThe query description.protected StringThe id of source factoryprotected StringThe query id.protected StringThe query name.The query parameter names.protected Query.ResultTypeThe query result type.Fields inherited from interface org.ametys.plugins.externaldata.data.Query
PARAMETER_MATCHER, PARAMETER_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription_buildParameters(String query) Extract parameters from a query string in the form ${parameterName}.Get the id of datasource on which depends this query.Get the query description.Get the id of source factorygetId()Get the query ID.getName()Get the query name.Get the query result type.voidsetDataSourceId(String dataSourceId) Set the id of data sourcevoidsetDescription(String description) Set the query description.voidsetFactory(String factoryId) Set the data source factoryvoidSet the query id.voidSet the query name.voidsetResultType(Query.ResultType resultType) Set the query result type.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.externaldata.data.Query
getAdditionalConfiguration, getParameters, getType
-
Field Details
-
_id
The query id. -
_name
The query name. -
_description
The query description. -
_parameters
The query parameter names. -
_resultType
The query result type. -
_dataSourceId
The datasource id. -
_factoryId
The id of source factory
-
-
Constructor Details
-
AbstractQuery
public AbstractQuery()
-
-
Method Details
-
getId
Description copied from interface:QueryGet the query ID. -
setId
Set the query id.- Parameters:
id- the id of the query
-
getName
Description copied from interface:QueryGet the query name. -
setName
Set the query name.- Parameters:
name- the name of the query
-
getDescription
Description copied from interface:QueryGet the query description.- Specified by:
getDescriptionin interfaceQuery- Returns:
- the query description.
-
setDescription
Set the query description.- Parameters:
description- the description of the query
-
getResultType
Description copied from interface:QueryGet the query result type.- Specified by:
getResultTypein interfaceQuery- Returns:
- the query result type.
-
setResultType
Set the query result type.- Parameters:
resultType- the query result type.
-
getFactory
Description copied from interface:QueryGet the id of source factory- Specified by:
getFactoryin interfaceQuery- Returns:
- the id of source factory
-
setFactory
Set the data source factory- Parameters:
factoryId- The id of source factory
-
getDataSourceId
Description copied from interface:QueryGet the id of datasource on which depends this query.- Specified by:
getDataSourceIdin interfaceQuery- Returns:
- the datasource on which depends this query.
-
setDataSourceId
Set the id of data source- Parameters:
dataSourceId- The id of data source
-
_buildParameters
Extract parameters from a query string in the form ${parameterName}.- Parameters:
query- the query containing parameters.- Returns:
- the parameter names as a Set.
-