Interface EnumParameter
- All Superinterfaces:
ParameterUsableInQuery
,RichPageParameter
- Since:
- 3.9.0
- Author:
- Jakub Stroleny, Polarion Software
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
Nested classes/interfaces inherited from interface com.polarion.alm.shared.api.model.rp.parameter.RichPageParameter
RichPageParameter.Visuals
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if multiple values allowed.set()
Returns first selected value ornull
if nothing is selected.toLucene()
Returns the value formated in such way that it can be used in Lucene querytoSql()
Returns the value formated in such way that it can be used in SQL queryvalues()
Return values.Methods inherited from interface com.polarion.alm.shared.api.model.rp.parameter.RichPageParameter
label, visuals
-
Method Details
-
values
Return values. Can be empty.- Returns:
- list with values.
-
singleValue
Returns first selected value ornull
if nothing is selected. -
toLucene
Returns the value formated in such way that it can be used in Lucene queryThis method is called automatically when the parameter is used in the Lucene + Velocity in data set parameter, so you can use it like this: severity:$pageParameters.myEnumParameter
If the value contains spaces it is surrounded by double quotes (")
For enumeration parameter it returns the list with ids of the selected options escaped same way as value of string parameter (see above) in brackets.
For empty or not specified parameter it returns "*" which works only for Polarion built in fields, so for custom fields it must be handled in different way. See how the "Query Bubbles" handle this situation in the Polarion UI.
- Specified by:
toLucene
in interfaceParameterUsableInQuery
-
toSql
Returns the value formated in such way that it can be used in SQL queryThis method is called automatically when the parameter is used in the SQL + Velocity in data set parameter, so you can use it like this: ... WHERE ... IN $pageParameters.myEnumParameter
Enumeration parameter expects using IN (not '=') construction for defining conditions.
For empty or not specified parameter it returns empty string in brackets
- Specified by:
toSql
in interfaceParameterUsableInQuery
-
set
- Returns:
- interface for setting parameter configuration which can be used inside
RichPageWidget.processParameterDependencies(RichPageWidgetDependenciesContext)
to change parameter configuration depending on values set by user in other parameters. - Throws:
UnsupportedOperationException
- if this parameter is a page parameter.- Since:
- 3.9.2
-
enumerationReference
- Since:
- 3.22.2
-
allowMultipleValues
boolean allowMultipleValues()Returnstrue
if multiple values allowed.- Since:
- 3.22.2
-