public interface Parameter extends Identifiable, Nameable, Customizable, Inheritable
This interface is used to represent a universe parameter, both for the data foundation and business layer.
A parameter is a variable in the universe that requires a value at query time.
Parameters are often defined to prompt the end-user to supply a value, and in this case are referred to as prompts.
The data foundation and business layer store a list of parameters that can be retrieved from the DataFoundation.getParameters() or
BusinessLayer.getParameters() methods.
To instantiate a parameter, you can use:
BusinessLayerFactory.createParameter(String, BusinessLayer)BusinessLayerFactory.createParameter(String, DataFoundation)DataFoundationFactory.createParameter(String, DataFoundation)This interface provides a series of methods to manage the parameter options.
The following features are supported:
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
getAssociatedLov()
Returns the value of the 'Associated Lov' reference.
|
LovParameterDataType |
getDataType()
Returns the value of the 'Data Type' attribute.
|
Answer |
getDefaultAnswer()
Returns the value of the 'Default Answer' reference.
|
java.lang.String |
getDescription()
Returns the value of the 'Description' attribute.
|
java.lang.String |
getPromptText()
Returns the value of the 'Prompt Text' attribute.
|
boolean |
isHidden()
Returns the value of the 'Hidden' attribute.
|
boolean |
isIndexAwarePrompt()
Returns the value of the 'Index Aware Prompt' attribute.
|
boolean |
isKeepLastValuesEnabled()
Returns the value of the 'Keep Last Values Enabled' attribute.
|
boolean |
isMultipleValuesAllowed()
Returns the value of the 'Multiple Values Allowed' attribute.
|
boolean |
isSelectedOnlyFromList()
Returns the value of the 'Selected Only From List' attribute.
|
boolean |
isUserPrompted()
Returns the value of the 'User Prompted' attribute.
|
void |
setAssociatedLov(java.lang.Object value)
Sets the value of the '
Associated Lov' reference. |
void |
setDataType(LovParameterDataType value)
Sets the value of the '
Data Type' attribute. |
void |
setDefaultAnswer(Answer value)
Sets the value of the '
Default Answer' reference. |
void |
setDescription(java.lang.String value)
Sets the value of the '
Description' attribute. |
void |
setHidden(boolean value)
Sets the value of the '
Hidden' attribute. |
void |
setIndexAwarePrompt(boolean value)
Sets the value of the '
Index Aware Prompt' attribute. |
void |
setKeepLastValuesEnabled(boolean value)
Sets the value of the '
Keep Last Values Enabled' attribute. |
void |
setMultipleValuesAllowed(boolean value)
Sets the value of the '
Multiple Values Allowed' attribute. |
void |
setPromptText(java.lang.String value)
Sets the value of the '
Prompt Text' attribute. |
void |
setSelectedOnlyFromList(boolean value)
Sets the value of the '
Selected Only From List' attribute. |
void |
setUserPrompted(boolean value)
Sets the value of the '
User Prompted' attribute. |
getIdentifiergetCustomPropertiesgetInheritedDatajava.lang.String getDescription()
This is the description of the parameter.
setDescription(String)void setDescription(java.lang.String value)
Description' attribute.
This is the description of the parameter.
value - the new value of the 'Description' attribute.getDescription()boolean isHidden()
"false".
Tells if the parameter is displayed (false) or hidden (true)
setHidden(boolean)void setHidden(boolean value)
Hidden' attribute.
Hides the parameter if value is true.
This makes the parameter unavailable in the universe.
value - the new value of the 'Hidden' attribute.isHidden()boolean isUserPrompted()
"true".
Tells if the end-user is prompted to enter a value for the parameter at runtime.
setUserPrompted(boolean)void setUserPrompted(boolean value)
User Prompted' attribute.
Prompts the end-user to enter a value for the parameter at runtime, if value is true.
If false, a pre-defined value is entered at runtime.
value - the new value of the 'User Prompted' attribute.isUserPrompted()java.lang.String getPromptText()
"Enter Parameter".
This is the text for the prompt question if the user is prompted.
setPromptText(String)void setPromptText(java.lang.String value)
Prompt Text' attribute.
This is the text for the prompt question if the user is prompted.
value - the new value of the 'Prompt Text' attribute.getPromptText()LovParameterDataType getDataType()
"STRING".
The literals are from the enumeration LovParameterDataType.
This is the data type that the parameter accepts.
LovParameterDataType,
setDataType(LovParameterDataType)void setDataType(LovParameterDataType value)
Data Type' attribute.
This is the data type that the parameter accepts.
value - the new value of the 'Data Type' attribute.LovParameterDataType,
getDataType()boolean isMultipleValuesAllowed()
"true".
Tells if the parameter used as prompt accepts multiple values as answers.
setMultipleValuesAllowed(boolean)void setMultipleValuesAllowed(boolean value)
Multiple Values Allowed' attribute.
The end-user is allowed to select multiple values as prompt answers if value is true.
value - the new value of the 'Multiple Values Allowed' attribute.isMultipleValuesAllowed()boolean isKeepLastValuesEnabled()
"true".
Tells if the last values chosen by the end-user are kept when the prompt is re-run.
setKeepLastValuesEnabled(boolean)void setKeepLastValuesEnabled(boolean value)
Keep Last Values Enabled' attribute.
The prompt is re-run with the last values chosen by the end-user if value is true.
value - the new value of the 'Keep Last Values Enabled' attribute.isKeepLastValuesEnabled()boolean isIndexAwarePrompt()
"false".
Tells if the prompt is index-aware.
setIndexAwarePrompt(boolean)void setIndexAwarePrompt(boolean value)
Index Aware Prompt' attribute.
The prompt is index-aware if value is true.
value - the new value of the 'Index Aware Prompt' attribute.isIndexAwarePrompt()boolean isSelectedOnlyFromList()
"false".
Tells if the end-user is obliged to select a member from a list.
setSelectedOnlyFromList(boolean)void setSelectedOnlyFromList(boolean value)
Selected Only From List' attribute.
The end-user is obliged to select a member from a list if value is true.
value - the new value of the 'Selected Only From List' attribute.isSelectedOnlyFromList()java.lang.Object getAssociatedLov()
This is the list of values associated with the parameter.
setAssociatedLov(Object)void setAssociatedLov(java.lang.Object value)
Associated Lov' reference.
This is the object associated with the parameter. It can be:
BusinessObject of the business layer (dimension or attribute)Important: you cannot associate a list of values created in the data foundation.
For example, in the case of StaticLov:
Parameter parameter = businessLayerFactory.createParameter("MyParameter", businessLayer);
parameter.setAssociatedLov(myStaticLov.getColumns().get(0));
...
In the case of a SQLQueryLov:
DataFoundationService.detectLovColumns(SQLQueryLov) or
BusinessLayerService.detectLovColumns(SQLQueryLov) method.For example:
SQLQueryLov sqlQueryLov = businessLayerFactory.createSQLQueryLov("SQLQueryLov", businessLayer);
sqlQueryLov.setSQLExpression("SELECT PRODUCT.PRODUCT_NAME FROM PRODUCT");
BusinessLayerService businessLayerService = context.getService(BusinessLayerService.class);
businessLayerService.detectLovColumns(sqlQueryLov);
parameter.setAssociatedLov(sqlQueryLov.getColumns().get(0));
...
value - the new value of the 'Associated Lov' reference.getAssociatedLov()Answer getDefaultAnswer()
This is the default value of the parameter.
setDefaultAnswer(Answer)void setDefaultAnswer(Answer value)
Default Answer' reference.
This is the default value of the parameter. If value is null, then the parameter has no default answer.
value - the new value of the 'Default Answer' reference.getDefaultAnswer()