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
_dataSourceId
The datasource id.protected String
_description
The query description.protected String
_factoryId
The id of source factoryprotected String
_id
The query id.protected String
_name
The query name.protected Map<String,String>
_parameters
The query parameter names.protected Query.ResultType
_resultType
The 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}.String
getDataSourceId()
Get the id of datasource on which depends this query.String
getDescription()
Get the query description.String
getFactory()
Get the id of source factoryString
getId()
Get the query ID.String
getName()
Get the query name.Query.ResultType
getResultType()
Get the query result type.void
setDataSourceId(String dataSourceId)
Set the id of data sourcevoid
setDescription(String description)
Set the query description.void
setFactory(String factoryId)
Set the data source factoryvoid
setId(String id)
Set the query id.void
setName(String name)
Set the query name.void
setResultType(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:Query
Get the query description.- Specified by:
getDescription
in 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:Query
Get the query result type.- Specified by:
getResultType
in 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:Query
Get the id of source factory- Specified by:
getFactory
in 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:Query
Get the id of datasource on which depends this query.- Specified by:
getDataSourceId
in 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.
-
-