Class AbstractQuery
- java.lang.Object
-
- org.ametys.plugins.externaldata.data.AbstractQuery
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.plugins.externaldata.data.Query
Query.ResultType
-
-
Field Summary
Fields Modifier and Type Field Description protected String_dataSourceIdThe datasource id.protected String_descriptionThe query description.protected String_factoryIdThe id of source factoryprotected String_idThe query id.protected String_nameThe query name.protected Map<String,String>_parametersThe query parameter names.protected Query.ResultType_resultTypeThe query result type.-
Fields inherited from interface org.ametys.plugins.externaldata.data.Query
PARAMETER_MATCHER, PARAMETER_PATTERN
-
-
Constructor Summary
Constructors Constructor Description AbstractQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,String>_buildParameters(String query)Extract parameters from a query string in the form ${parameterName}.StringgetDataSourceId()Get the id of datasource on which depends this query.StringgetDescription()Get the query description.StringgetFactory()Get the id of source factoryStringgetId()Get the query ID.StringgetName()Get the query name.Query.ResultTypegetResultType()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 factoryvoidsetId(String id)Set the query id.voidsetName(String name)Set 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, wait
-
Methods inherited from interface org.ametys.plugins.externaldata.data.Query
getAdditionalConfiguration, getParameters, getType
-
-
-
-
Field Detail
-
_description
protected String _description
The query description.
-
_parameters
protected Map<String,String> _parameters
The query parameter names.
-
_resultType
protected Query.ResultType _resultType
The query result type.
-
_dataSourceId
protected String _dataSourceId
The datasource id.
-
_factoryId
protected String _factoryId
The id of source factory
-
-
Constructor Detail
-
AbstractQuery
public AbstractQuery()
-
-
Method Detail
-
setName
public void setName(String name)
Set the query name.- Parameters:
name- the name of the query
-
getDescription
public String getDescription()
Description copied from interface:QueryGet the query description.- Specified by:
getDescriptionin interfaceQuery- Returns:
- the query description.
-
setDescription
public void setDescription(String description)
Set the query description.- Parameters:
description- the description of the query
-
getResultType
public Query.ResultType getResultType()
Description copied from interface:QueryGet the query result type.- Specified by:
getResultTypein interfaceQuery- Returns:
- the query result type.
-
setResultType
public void setResultType(Query.ResultType resultType)
Set the query result type.- Parameters:
resultType- the query result type.
-
getFactory
public String getFactory()
Description copied from interface:QueryGet the id of source factory- Specified by:
getFactoryin interfaceQuery- Returns:
- the id of source factory
-
setFactory
public void setFactory(String factoryId)
Set the data source factory- Parameters:
factoryId- The id of source factory
-
getDataSourceId
public String 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
public void setDataSourceId(String dataSourceId)
Set the id of data source- Parameters:
dataSourceId- The id of data source
-
_buildParameters
protected Map<String,String> _buildParameters(String query)
Extract parameters from a query string in the form ${parameterName}.- Parameters:
query- the query containing parameters.- Returns:
- the parameter names as a Set.
-
-