public class ScalarParameterHandle extends AbstractScalarParameterHandle implements org.eclipse.birt.report.model.elements.interfaces.IScalarParameterModel
null
is allowed. If so, the value of
the parameter is null. If nulls are not allowed, then the user must enter a
value.
Scalar parameters can have static or dynamic selection lists.
ScalarParameter
,
ParameterHandle
element
module
ALIGNMENT_PROP, ALLOW_BLANK_PROP, ALLOW_NULL_PROP, AUTO_SUGGEST_THRESHOLD_PROP, BOUND_DATA_COLUMNS_PROP, CONCEAL_VALUE_PROP, FIXED_ORDER_PROP, FORMAT_PROP, GET_DEFAULT_VALUE_LIST_PROP, GET_SELECTION_VALUE_LIST_PROP, MUCH_MATCH_PROP, PARAM_TYPE_PROP
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
HELP_TEXT_KEY_PROP, HELP_TEXT_PROP, HIDDEN_PROP, PROMPT_TEXT_ID_PROP, PROMPT_TEXT_PROP, VALIDATE_PROP
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
Constructor and Description |
---|
ScalarParameterHandle(org.eclipse.birt.report.model.core.Module module,
org.eclipse.birt.report.model.core.DesignElement element)
Constructs a handle for the ScalarParamter with the given design and the
parameter.
|
Modifier and Type | Method and Description |
---|---|
ComputedColumnHandle |
addColumnBinding(ComputedColumn addColumn,
boolean inForce)
Adds a bound column to the list.
|
boolean |
allowBlank()
Deprecated.
|
boolean |
allowNull()
Deprecated.
|
java.util.Iterator |
columnBindingsIterator()
Returns the bound columns that binds the data set columns.
|
java.lang.String |
getAlignment()
Returns the alignment for this parameter.
|
int |
getAutoSuggestThreshold()
Returns the maximal number of of entries a report parameter pick list can
have.
|
java.lang.String |
getCategory()
Returns the category for the parameter format.
|
PropertyHandle |
getColumnBindings()
Get a handle to deal with the bound column.
|
java.lang.String |
getControlType()
Returns the control type for this parameter.
|
java.lang.String |
getDefaultValue()
Deprecated.
since 2.5 replaced by
AbstractScalarParameterHandleImpl.getDefaultValueList() |
java.lang.String |
getDefaultValueListMethod()
Gets the method content of
getDefaultValueList . |
java.lang.String |
getFormat()
Deprecated.
replaced by getPattern and getCategory.
|
java.lang.String |
getLabelColumn()
Deprecated.
Replaced by the method
AbstractScalarParameterHandleImpl.getLabelExpr() |
int |
getListlimit()
get the list limited number.
|
java.lang.String |
getParamType()
Returns the parameter type for this scalar parameter.
|
java.lang.String |
getPattern()
Returns the pattern of format instructions for the parameter value.
|
java.lang.Object |
getProperty(java.lang.String propName)
Returns the value of a property as a generic object.
|
java.lang.String |
getSelectionValueListMethod()
Gets the method content of
getSelectionValueList . |
java.lang.String |
getType()
Deprecated.
Replaced by the method
AbstractScalarParameterHandleImpl.getDataType() |
java.lang.String |
getValueColumn()
Deprecated.
Replaced by the method
AbstractScalarParameterHandleImpl.getValueExpr() |
boolean |
isConcealValue()
Tests whether hides the user's entry by displaying asterisks.
|
boolean |
isFixedOrder()
Tests whether to display values in the order defined in the list.
|
boolean |
isMustMatch()
Tests whether the value must match one of values in the selection list.
|
void |
removedUnusedColumnBindings()
Removed unused bound columns from the parameter.
|
void |
setAlignment(java.lang.String align)
Sets the alignment for this parameter.
|
void |
setAllowBlank(boolean allowBlank)
Deprecated.
|
void |
setAllowNull(boolean allowNull)
Deprecated.
|
void |
setAutoSuggestThreshold(int number)
Sets the maximal number of of entries a report parameter pick list can
have.
|
void |
setCategory(java.lang.String category)
Sets the category for the parameter format.
|
void |
setConcealValue(boolean concealValue)
Sets the attribute that's hides the user's entry by displaying asterisks.
|
void |
setControlType(java.lang.String controlType)
Sets the control type for this parameter.
|
void |
setDefaultValue(java.lang.String defaultValue)
Deprecated.
since 2.5 replaced by
AbstractScalarParameterHandleImpl.setDefaultValueList(List) |
void |
setDefaultValueListMethod(java.lang.String getDefaultValueListMethod)
Sets the method content of
getDefaultValueList . |
void |
setFixedOrder(boolean fixedOrder)
Sets the flag indicates that whether to display values in the order
defined in the list.
|
void |
setFormat(java.lang.String format)
Deprecated.
replaced by setPattern and setCategory.
|
void |
setLabelColumn(java.lang.String labelColumn)
Deprecated.
Replaced by the method
AbstractScalarParameterHandleImpl.setLabelExpr(String) |
void |
setMustMatch(boolean mustMatch)
Sets the flag indicates that whether the value must match one of values
in the selection list.
|
void |
setParamType(java.lang.String type)
Sets the parameter type for this scalar parameter.
|
void |
setPattern(java.lang.String pattern)
Sets the pattern of format instructions for the parameter value.
|
void |
setProperty(java.lang.String propName,
java.lang.Object value)
Sets the value of a property from a generic object.
|
void |
setSelectionValueListMethod(java.lang.String getSelectionValueListMethod)
Sets the method content of
getSelectionValueList . |
void |
setType(java.lang.String type)
Deprecated.
Replaced by the method
AbstractScalarParameterHandleImpl.setDataType(String) |
void |
setValueColumn(java.lang.String valueColumn)
Deprecated.
Replaced by the method
AbstractScalarParameterHandleImpl.setValueExpr(String) |
choiceIterator, distinct, getDataSet, getDataSetName, getDataType, getDefaultValueList, getLabelExpr, getSortBy, getSortByColumn, getSortDirection, getValueExpr, getValueType, isRequired, setDataSet, setDataSetName, setDataType, setDefaultValueList, setDistinct, setIsRequired, setLabelExpr, setListlimit, setSortBy, setSortByColumn, setSortDirection, setValueExpr, setValueType
getDisplayPromptText, getHelpText, getHelpTextKey, getPromptText, getPromptTextID, getValidate, isHidden, setHelpText, setHelpTextKey, setHidden, setPromptText, setPromptTextID, setValidate
getComments, getCustomXml, getDisplayName, getDisplayNameKey, getElement, getPropertyMask, isValidLayoutForCompoundElement, isValidReferenceForCompoundElement, propertyMaskIterator, setComments, setCustomXml, setDisplayName, setDisplayNameKey, setPropertyMask
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, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getQualifiedName, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, 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, setPropertyBinding, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError, slotsIterator
public ScalarParameterHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
module
- the moduleelement
- the model representation of the elementpublic java.lang.String getDefaultValue()
AbstractScalarParameterHandleImpl.getDefaultValueList()
public void setDefaultValue(java.lang.String defaultValue) throws SemanticException
AbstractScalarParameterHandleImpl.setDefaultValueList(List)
defaultValue
- the default value for the parameterSemanticException
- if the property is locked.public boolean isConcealValue()
true
if hides the user's entry by asterisks,
false
if shows characters as usual.public void setConcealValue(boolean concealValue) throws SemanticException
concealValue
- true
if hides the user's entry by asterisks,
false
if shows characters as usual.SemanticException
- if the property is locked.public boolean allowNull()
AbstractScalarParameterHandleImpl.isRequired()
null
.true
if the value can be null
,
false
if the value can not be null
.public void setAllowNull(boolean allowNull) throws SemanticException
AbstractScalarParameterHandleImpl.setIsRequired(boolean)
null
.allowNull
- true
if the value can be null
,
false
if the value can not be null
.SemanticException
- if the property is locked.public boolean allowBlank()
AbstractScalarParameterHandleImpl.isRequired()
null
.true
if the value can be null
,
false
if the value can not be null
.public void setAllowBlank(boolean allowBlank) throws SemanticException
AbstractScalarParameterHandleImpl.setIsRequired(boolean)
null
.allowBlank
- true
if the value can be null
,
false
if the value can not be null
.SemanticException
- if the property is locked.public java.lang.String getFormat()
public java.lang.String getPattern()
public java.lang.String getCategory()
public void setFormat(java.lang.String format) throws SemanticException
format
- the format for the parameter valueSemanticException
- if the property is locked.public void setPattern(java.lang.String pattern) throws SemanticException
pattern
- the format for the parameter valueSemanticException
- if the property is locked.public void setCategory(java.lang.String category) throws SemanticException
category
- the category for the formatSemanticException
- if the property is locked.public java.lang.String getControlType()
DesignChoiceConstants
:
DesignChoiceConstants
public int getListlimit()
getListlimit
in class AbstractScalarParameterHandleImpl
public void setControlType(java.lang.String controlType) throws SemanticException
DesignChoiceConstants
:
controlType
- the control type for the UI to display the parameterSemanticException
- if the input type is not one of above choices.AbstractScalarParameterHandleImpl.getDataType()
,
DesignChoiceConstants
public java.lang.String getAlignment()
DesignChoiceConstants
:
SCALAR_PARAM_ALIGN_AUTO
SCALAR_PARAM_ALIGN_LEFT
SCALAR_PARAM_ALIGN_CENTER
SCALAR_PARAM_ALIGN_RIGHT
DesignChoiceConstants
public void setAlignment(java.lang.String align) throws SemanticException
DesignChoiceConstants
:
SCALAR_PARAM_ALIGN_AUTO
SCALAR_PARAM_ALIGN_LEFT
SCALAR_PARAM_ALIGN_CENTER
SCALAR_PARAM_ALIGN_RIGHT
align
- the alignment for the UI to display the parameterSemanticException
- if the input type is not one of above choices.DesignChoiceConstants
public boolean isMustMatch()
true
if the value must match one of values in the
list, otherwise false
.public void setMustMatch(boolean mustMatch) throws SemanticException
mustMatch
- true
if the value must match one of values in the
list, otherwise false
.SemanticException
- if the property is locked.public boolean isFixedOrder()
true
if to display value in the order, otherwise
false
.public void setFixedOrder(boolean fixedOrder) throws SemanticException
fixedOrder
- true
if to display values in the order, otherwise
false
.SemanticException
- if the property is locked.public java.lang.String getValueColumn()
AbstractScalarParameterHandleImpl.getValueExpr()
public void setValueColumn(java.lang.String valueColumn) throws SemanticException
AbstractScalarParameterHandleImpl.setValueExpr(String)
valueColumn
- the name of the query columnSemanticException
- if the property is locked.public java.lang.String getLabelColumn()
AbstractScalarParameterHandleImpl.getLabelExpr()
public void setLabelColumn(java.lang.String labelColumn) throws SemanticException
AbstractScalarParameterHandleImpl.setLabelExpr(String)
labelColumn
- the name of the query columnSemanticException
- if the property is locked.public java.lang.String getType()
AbstractScalarParameterHandleImpl.getDataType()
DesignChoiceConstants
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
setType(String)
,
DesignChoiceConstants
public void setType(java.lang.String type) throws SemanticException
AbstractScalarParameterHandleImpl.setDataType(String)
DesignChoiceConstants
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
type
- the type for the parameterSemanticException
- if the input type is not one of above choices.getType()
,
DesignChoiceConstants
public java.util.Iterator columnBindingsIterator()
ComputedColumnHandle
.public PropertyHandle getColumnBindings()
public ComputedColumnHandle addColumnBinding(ComputedColumn addColumn, boolean inForce) throws SemanticException
addColumn
- the bound column to addinForce
- true
the column is added to the list regardless
of duplicate expression. false
do not add the
column if the expression already existcolumn
- the bound columnComputedColumnHandle
or the
existed ComputedColumnHandle
in the listSemanticException
- if expression is not duplicate but the name duplicates the
existing bound column. Or, if the both name/expression are
duplicate, but inForce
is true
.public void removedUnusedColumnBindings() throws SemanticException
SemanticException
- if bound column property is locked.public void setProperty(java.lang.String propName, java.lang.Object value) throws SemanticException
DesignElementHandle
setProperty
in class DesignElementHandle
propName
- the property namevalue
- the value to setSemanticException
- if the property is undefined on the element or the value is
invalid.public java.lang.Object getProperty(java.lang.String propName)
DesignElementHandle
getProperty
in class DesignElementHandle
propName
- the name of the property of interestDesignElementHandle.getIntProperty(java.lang.String)
,
DesignElementHandle.getStringProperty(java.lang.String)
,
DesignElementHandle.getFloatProperty(java.lang.String)
,
DesignElementHandle.getNumberProperty(java.lang.String)
public java.lang.String getParamType()
DesignChoiceConstants
can be one of the followings:
SCALAR_PARAM_TYPE_SIMPLE
SCALAR_PARAM_TYPE_MULTI_VALUE
SCALAR_PARAM_TYPE_AD_HOC
setParamType(String)
,
DesignChoiceConstants
public void setParamType(java.lang.String type) throws SemanticException
DesignChoiceConstants
can be one of the followings:
SCALAR_PARAM_TYPE_SIMPLE
SCALAR_PARAM_TYPE_MULTI_VALUE
SCALAR_PARAM_TYPE_AD_HOC
type
- the type for the parameterSemanticException
- if the input type is not one of above choices.getParamType()
,
DesignChoiceConstants
public int getAutoSuggestThreshold()
public void setAutoSuggestThreshold(int number) throws SemanticException
number
- the threshold number.SemanticException
public java.lang.String getDefaultValueListMethod()
getDefaultValueList
.getDefaultValueList
public void setDefaultValueListMethod(java.lang.String getDefaultValueListMethod) throws SemanticException
getDefaultValueList
.getDefaultValueListMethod
- the method content of getDefaultValueList
to setSemanticException
public java.lang.String getSelectionValueListMethod()
getSelectionValueList
.getSelectionValueList
public void setSelectionValueListMethod(java.lang.String getSelectionValueListMethod) throws SemanticException
getSelectionValueList
.getSelectionValueListMethod
- the method content of getSelectionValueList
to
setSemanticException
Copyright © 2014 OpenText Corp. All rights reserved.