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
Modifier and TypeFieldDescriptionprotected String
The datasource id.protected String
The query description.protected String
The id of source factoryprotected String
The query id.protected String
The query name.The query parameter names.protected Query.ResultType
The query result type.Fields inherited from interface org.ametys.plugins.externaldata.data.Query
PARAMETER_MATCHER, PARAMETER_PATTERN
-
Constructor Summary
-
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.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
Set the query id.void
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 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:Query
Get the query ID. -
setId
Set the query id.- Parameters:
id
- the id of the query
-
getName
Description copied from interface:Query
Get the query name. -
setName
Set the query name.- Parameters:
name
- the name of the query
-
getDescription
Description copied from interface:Query
Get the query description.- Specified by:
getDescription
in interfaceQuery
- Returns:
- the query description.
-
setDescription
Set the query description.- Parameters:
description
- the description of the query
-
getResultType
Description copied from interface:Query
Get the query result type.- Specified by:
getResultType
in interfaceQuery
- Returns:
- the query result type.
-
setResultType
Set the query result type.- Parameters:
resultType
- the query result type.
-
getFactory
Description copied from interface:Query
Get the id of source factory- Specified by:
getFactory
in 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: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
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.
-