Class AbstractScalarParameterHandleImpl
java.lang.Object
org.eclipse.birt.report.model.api.DesignElementHandle
org.eclipse.birt.report.model.api.ReportElementHandle
org.eclipse.birt.report.model.api.ParameterHandle
org.eclipse.birt.report.model.api.AbstractScalarParameterHandleImpl
- All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IAbstractScalarParameterModel
,org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
,org.eclipse.birt.report.model.elements.interfaces.IInternalAbstractScalarParameterModel
,org.eclipse.birt.report.model.elements.interfaces.IParameterModel
- Direct Known Subclasses:
AbstractScalarParameterHandle
public abstract class AbstractScalarParameterHandleImpl
extends ParameterHandle
implements org.eclipse.birt.report.model.elements.interfaces.IAbstractScalarParameterModel
Represents the abstract scalar parameter types.
- See Also:
-
AbstractScalarParameter
-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
element
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NEW_HANDLER_ON_EACH_EVENT_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IInternalAbstractScalarParameterModel
CONTROL_TYPE_PROP, DATA_TYPE_PROP, DATASET_NAME_PROP, DEFAULT_VALUE_PROP, DISTINCT_PROP, IS_REQUIRED_PROP, LABEL_EXPR_PROP, LIST_LIMIT_PROP, SELECTION_LIST_PROP, SORT_BY_COLUMN_PROP, SORT_BY_PROP, SORT_DIRECTION_PROP, VALUE_EXPR_PROP, VALUE_TYPE_PROP
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IParameterModel
HELP_TEXT_KEY_PROP, HELP_TEXT_PROP, HIDDEN_PROP, PROMPT_TEXT_ID_PROP, PROMPT_TEXT_PROP, VALIDATE_PROP
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractScalarParameterHandleImpl
(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionIterator<?>
Returns the iterator for the static selection list defined on this scalar parameter.boolean
distinct()
Checks whether duplicate values should be shown when preview.Returns the handle for the data set defined on the parameter.Returns the data set name of the dynamic list for this parameter.Returns the data type for this parameter.Returns the default value list of the parameter.Returns an expression on the data row from the dynamic list data set that returns the prompt for the choice.int
get the list limited number.Gets the sort key for parameter values when preview.Gets the expression by which the result sorts.Gets the sort order for parameter values when preview.Returns an expression on the data row from the dynamic list data set that returns the value for the choice.Returns the parameter type for this scalar parameter.boolean
Tests whether the string value of the parameter is required.void
setDataSet
(DataSetHandle handle) Sets the data set of the report item.void
setDataSetName
(String dataSetName) Sets the data set name of the dynamic list for this parameter.void
setDataType
(String type) Sets the data type for this parameter.void
setDefaultValueList
(List<? extends Object> defaultValueList) Sets the default value list of the parameter.void
setDistinct
(boolean distinct) Sets the flag that indicates whether duplicate values should be shown when preview.void
setIsRequired
(boolean isRequired) Sets the flag that indicates whether the value of the parameter is required.void
setLabelExpr
(String labelExpr) Sets an expression on the data row from the dynamic list data set that returns the prompt for the choice.void
setListlimit
(int listLimit) Set the value for the list limitation number.void
Sets the sort key for parameter values when preview.void
setSortByColumn
(String sortByColumn) Sets the expression by which the result sorts.void
setSortDirection
(String direction) Sets the sort order for parameter values when preview.void
setValueExpr
(String valueExpr) Sets an expression on the data row from the dynamic list data set that returns the value for the choice.void
setValueType
(String type) Sets the parameter value type for this scalar parameter.Methods inherited from class org.eclipse.birt.report.model.api.ParameterHandle
getDisplayPromptText, getHelpText, getHelpTextKey, getPromptText, getPromptTextID, getValidate, isHidden, setHelpText, setHelpTextKey, setHidden, setPromptText, setPromptTextID, setValidate
Methods inherited from class org.eclipse.birt.report.model.api.ReportElementHandle
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask
Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
add, add, addElement, addElement, addListener, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, canTransformToTemplate, clearAllProperties, clearContents, clearProperty, clientsIterator, copy, copyPropertyTo, createTemplateElement, derivedIterator, doSort, drop, drop, drop, dropAndClear, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getEventHandlerClass, getExpressionProperty, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getProperty, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getTagType, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isTemplateParameterValue, isValid, localize, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setBooleanProperty, setEncryption, setEventHandlerClass, setExpressionProperty, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError, slotsIterator
-
Constructor Details
-
AbstractScalarParameterHandleImpl
public AbstractScalarParameterHandleImpl(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Constructor.- Parameters:
module
- the moduleelement
- the model representation of the element
-
-
Method Details
-
setIsRequired
Sets the flag that indicates whether the value of the parameter is required. For string type parameter, if the value is required, it cannot benull
or empty. For other type parameters, required value cannot benull
.- Parameters:
isRequired
-true
if the value is required. Otherwisefalse
.- Throws:
SemanticException
- if the property is locked.
-
isRequired
public boolean isRequired()Tests whether the string value of the parameter is required. For string type parameter, if the value is required, it cannot benull
or empty. For other type parameters, required value cannot benull
.- Returns:
true
if the value is required. Otherwisefalse
.
-
setSortByColumn
Sets the expression by which the result sorts.- Parameters:
sortByColumn
- expression by which the result sorts- Throws:
SemanticException
-
getSortByColumn
Gets the expression by which the result sorts.- Returns:
- the expression by which the result sorts
-
setSortDirection
Sets the sort order for parameter values when preview. The input argument can be- DesignChoiceConstants.SORT_DIRECTION_ASC
- DesignChoiceConstants.SORT_DIRECTION_DESC
null
- Parameters:
direction
-- Throws:
SemanticException
- if the property is locked.
-
getSortDirection
Gets the sort order for parameter values when preview. The return value can be- DesignChoiceConstants.SORT_DIRECTION_ASC
- DesignChoiceConstants.SORT_DIRECTION_DESC
null
- Returns:
- the sort order for parameter values
-
setSortBy
Sets the sort key for parameter values when preview. The input argument can be- DesignChoiceConstants.PARAM_SORT_VALUES_VALUE
- DesignChoiceConstants.PARAM_SORT_VALUES_LABEL
- Parameters:
sortValue
-- Throws:
SemanticException
- if the property is locked.
-
getSortBy
Gets the sort key for parameter values when preview. The return value can be- DesignChoiceConstants.PARAM_SORT_VALUES_VALUE
- DesignChoiceConstants.PARAM_SORT_VALUES_LABEL
- Returns:
- the sort key for parameter values
-
getValueType
Returns the parameter type for this scalar parameter. Types are defined inDesignChoiceConstants
can be one of the followings:PARAM_VALUE_TYPE_STATIC
PARAM_VALUE_TYPE_DYNAMIC
- Returns:
- the type for the scalar parameter
- See Also:
-
setValueType
Sets the parameter value type for this scalar parameter. Types are defined inDesignChoiceConstants
can be one of the followings:PARAM_TYPE_STATIC
PARAM_TYPE_DYNAMIC
- Parameters:
type
- the type for the scalar parameter- Throws:
SemanticException
- if the input type is not one of above choices.- See Also:
-
setListlimit
Set the value for the list limitation number. This property is used to limit the parameter display list.- Parameters:
listLimit
- The limited number.- Throws:
SemanticException
-
getListlimit
public int getListlimit()get the list limited number.- Returns:
- the display prompt.
-
getValueExpr
Returns an expression on the data row from the dynamic list data set that returns the value for the choice.- Returns:
- the expression that returns the parameter value for each row in the dynamic list.
-
setValueExpr
Sets an expression on the data row from the dynamic list data set that returns the value for the choice.- Parameters:
valueExpr
- the expression that returns the parameter value for each row in the dynamic list.- Throws:
SemanticException
- if the property is locked.
-
getLabelExpr
Returns an expression on the data row from the dynamic list data set that returns the prompt for the choice.- Returns:
- an expression that returns the display value for each row in the dynamic list.
-
setLabelExpr
Sets an expression on the data row from the dynamic list data set that returns the prompt for the choice.- Parameters:
labelExpr
- an expression that returns the display value for each row in the dynamic list.- Throws:
SemanticException
- if the property is locked.
-
setDataSetName
Sets the data set name of the dynamic list for this parameter.- Parameters:
dataSetName
- the data set name of the dynamic list- Throws:
SemanticException
- if the property is locked.
-
setDataSet
Sets the data set of the report item.- Parameters:
handle
- the handle of the data set, ifhandle
is null, data set property will be cleared.- Throws:
SemanticException
- if the property is locked.
-
choiceIterator
Returns the iterator for the static selection list defined on this scalar parameter. Each element in the iterator is the an instance ofSelectionChoiceHandle
.- Returns:
- the iterator for selection list defined on this scalar parameter.
- See Also:
-
getDataSetName
Returns the data set name of the dynamic list for this parameter.- Returns:
- the data set name of the dynamic list
-
getDataSet
Returns the handle for the data set defined on the parameter. If the parameter do not define the data set name or if the data set is not defined in the design/library scope, returnnull
.- Returns:
- the handle to the data set
-
setDefaultValueList
Sets the default value list of the parameter. Each item in the list can be an expression, but cannot reference any other parameters.- Parameters:
defaultValueList
- the default value for the parameter- Throws:
SemanticException
- if the property is locked.
-
getDefaultValueList
Returns the default value list of the parameter. Each item in this list can be an expression, but cannot reference any other parameters.- Returns:
- the default value
-
getDataType
Returns the data type for this parameter. The data type controls how the requester formats, parses and validates the parameter. Types are defined inDesignChoiceConstants
can be one of the followings:PARAM_TYPE_STRING
PARAM_TYPE_FLOAT
PARAM_TYPE_DECIMAL
PARAM_TYPE_INTEGER
PARAM_TYPE_DATETIME
PARAM_TYPE_DATE
PARAM_TYPE_TIME
PARAM_TYPE_BOOLEAN
- Returns:
- the type for the parameter
- See Also:
-
setDataType
Sets the data type for this parameter. The data type controls how the Requester formats, parses and validates the parameter. Types are defined inDesignChoiceConstants
can be one of the followings:PARAM_TYPE_STRING
PARAM_TYPE_FLOAT
PARAM_TYPE_DECIMAL
PARAM_TYPE_INTEGER
PARAM_TYPE_DATETIME
PARAM_TYPE_DATE
PARAM_TYPE_TIME
PARAM_TYPE_BOOLEAN
- Parameters:
type
- the type for the parameter- Throws:
SemanticException
- if the input type is not one of above choices.- See Also:
-
setDistinct
Sets the flag that indicates whether duplicate values should be shown when preview.- Parameters:
distinct
-true
if duplicate values only show once. Otherwisefalse
.- Throws:
SemanticException
- if the property is locked.
-
distinct
public boolean distinct()Checks whether duplicate values should be shown when preview.- Returns:
true
if duplicate values only show once. Otherwisefalse
.
-