|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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.ScalarParameterHandle
public class ScalarParameterHandle
Represents a scalar (single-value) report parameter. If the user enters no
value for a parameter, then the default value is used. If there is no default
value, then BIRT checks if 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
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.IScalarParameterModel |
---|
ALIGNMENT_PROP, ALLOW_BLANK_PROP, ALLOW_NULL_PROP, AUTO_SUGGEST_THRESHOLD_PROP, BOUND_DATA_COLUMNS_PROP, CONCEAL_VALUE_PROP, CONTROL_TYPE_PROP, DATA_TYPE_PROP, DATASET_NAME_PROP, DEFAULT_VALUE_PROP, DISTINCT_PROP, FIXED_ORDER_PROP, FORMAT_PROP, IS_REQUIRED_PROP, LABEL_EXPR_PROP, LIST_LIMIT_PROP, MUCH_MATCH_PROP, PARAM_TYPE_PROP, PROMPT_TEXT_ID_PROP, PROMPT_TEXT_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, VALIDATE_PROP |
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, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
ComputedColumnHandle |
addColumnBinding(ComputedColumn addColumn,
boolean inForce)
Adds a bound column to the list. |
boolean |
allowBlank()
Deprecated. by isRequired() |
boolean |
allowNull()
Deprecated. by isRequired() |
java.util.Iterator |
choiceIterator()
Returns the iterator for the static selection list defined on this scalar parameter. |
java.util.Iterator |
columnBindingsIterator()
Returns the bound columns that binds the data set columns. |
boolean |
distinct()
Checks whether duplicate values should be shown when preview. |
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. |
DataSetHandle |
getDataSet()
Returns the handle for the data set defined on the parameter. |
java.lang.String |
getDataSetName()
Returns the data set name of the dynamic list for this parameter. |
java.lang.String |
getDataType()
Returns the data type for this parameter. |
java.lang.String |
getDefaultValue()
Returns the default value of the parameter. |
java.lang.String |
getDisplayPromptText()
Returns the localized text for prompt text. |
java.lang.String |
getFormat()
Deprecated. replaced by getPattern and getCategory. |
java.lang.String |
getLabelColumn()
Deprecated. Replaced by the method getLabelExpr() |
java.lang.String |
getLabelExpr()
Returns an expression on the data row from the dynamic list data set that returns the prompt for the choice. |
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.String |
getPromptText()
get the display prompt text. |
java.lang.String |
getPromptTextID()
Returns the prompt text ID. |
java.lang.Object |
getProperty(java.lang.String propName)
Returns the value of a property as a generic object. |
java.lang.String |
getSortBy()
Gets the sort key for parameter values when preview. |
java.lang.String |
getSortByColumn()
Gets the expression by which the result sorts. |
java.lang.String |
getSortDirection()
Gets the sort order for parameter values when preview. |
java.lang.String |
getType()
Deprecated. Replaced by the method getDataType() |
java.lang.String |
getValueColumn()
Deprecated. Replaced by the method getValueExpr() |
java.lang.String |
getValueExpr()
Returns an expression on the data row from the dynamic list data set that returns the value for the choice. |
java.lang.String |
getValueType()
Returns the parameter type for this scalar parameter. |
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. |
boolean |
isRequired()
Tests whether the string value of the parameter is required. |
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. by setIsRequired(boolean) |
void |
setAllowNull(boolean allowNull)
Deprecated. by setIsRequired(boolean) |
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 |
setDataSetName(java.lang.String dataSetName)
Sets the data set name of the dynamic list for this parameter. |
void |
setDataType(java.lang.String type)
Sets the data type for this parameter. |
void |
setDefaultValue(java.lang.String defaultValue)
Sets the default value of the parameter. |
void |
setDistinct(boolean distinct)
Sets the flag that indicates whether duplicate values should be shown when preview. |
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 |
setIsRequired(boolean isRequired)
Sets the flag that indicates whether the value of the parameter is required. |
void |
setLabelColumn(java.lang.String labelColumn)
Deprecated. Replaced by the method setLabelExpr(String) |
void |
setLabelExpr(java.lang.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 |
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 |
setPromptText(java.lang.String promptValue)
Set the value for the display prompt context. |
void |
setPromptTextID(java.lang.String promptIDValue)
Set the value for the prompt text ID. |
void |
setProperty(java.lang.String propName,
java.lang.Object value)
Sets the value of a property from a generic object. |
void |
setSortBy(java.lang.String sortValue)
Sets the sort key for parameter values when preview. |
void |
setSortByColumn(java.lang.String sortByColumn)
Sets the expression by which the result sorts. |
void |
setSortDirection(java.lang.String direction)
Sets the sort order for parameter values when preview. |
void |
setType(java.lang.String type)
Deprecated. Replaced by the method setDataType(String) |
void |
setValueColumn(java.lang.String valueColumn)
Deprecated. Replaced by the method setValueExpr(String) |
void |
setValueExpr(java.lang.String valueExpr)
Sets an expression on the data row from the dynamic list data set that returns the value for the choice. |
void |
setValueType(java.lang.String type)
Sets the parameter value type for this scalar parameter. |
Methods inherited from class org.eclipse.birt.report.model.api.ParameterHandle |
---|
getHelpText, getHelpTextKey, getValidate, isHidden, setHelpText, setHelpTextKey, setHidden, 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 elementMethod Detail |
---|
public java.lang.String getDataType()
DesignChoiceConstants
can be one of the followings:
PARAM_TYPE_STRING
PARAM_TYPE_FLOAT
PARAM_TYPE_DECIMAL
PARAM_TYPE_INTEGER
PARAM_TYPE_DATETYPE
PARAM_TYPE_BOOLEAN
setDataType(String)
,
DesignChoiceConstants
public void setDataType(java.lang.String type) throws SemanticException
DesignChoiceConstants
can be one of the followings:
PARAM_TYPE_STRING
PARAM_TYPE_FLOAT
PARAM_TYPE_DECIMAL
PARAM_TYPE_INTEGER
PARAM_TYPE_DATETYPE
PARAM_TYPE_BOOLEAN
type
- the type for the parameter
SemanticException
- if the input type is not one of above choices.getDataType()
,
DesignChoiceConstants
public java.lang.String getDefaultValue()
public void setDefaultValue(java.lang.String defaultValue) throws SemanticException
defaultValue
- the default value for the parameter
SemanticException
- 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()
isRequired()
null
.
true
if the value can be null
,
false
if the value can not be null
.public void setAllowNull(boolean allowNull) throws SemanticException
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()
isRequired()
null
.
true
if the value can be null
,
false
if the value can not be null
.public void setAllowBlank(boolean allowBlank) throws SemanticException
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 value
SemanticException
- if the property is locked.public void setPattern(java.lang.String pattern) throws SemanticException
pattern
- the format for the parameter value
SemanticException
- if the property is locked.public void setCategory(java.lang.String category) throws SemanticException
category
- the category for the format
SemanticException
- if the property is locked.public java.lang.String getControlType()
DesignChoiceConstants
:
DesignChoiceConstants
public void setControlType(java.lang.String controlType) throws SemanticException
DesignChoiceConstants
:
controlType
- the control type for the UI to display the parameter
SemanticException
- if the input type is not one of above choices.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 parameter
SemanticException
- 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.util.Iterator choiceIterator()
SelectionChoiceHandle
.
SelectionChoice
public java.lang.String getDataSetName()
public DataSetHandle getDataSet()
null
.
public void setDataSetName(java.lang.String dataSetName) throws SemanticException
dataSetName
- the data set name of the dynamic list
SemanticException
- if the property is locked.public java.lang.String getValueExpr()
public void setValueExpr(java.lang.String valueExpr) throws SemanticException
valueExpr
- the expression that returns the parameter value for each row
in the dynamic list.
SemanticException
- if the property is locked.public java.lang.String getLabelExpr()
public void setLabelExpr(java.lang.String labelExpr) throws SemanticException
labelExpr
- an expression that returns the display value for each row in
the dynamic list.
SemanticException
- if the property is locked.public java.lang.String getValueColumn()
getValueExpr()
public void setValueColumn(java.lang.String valueColumn) throws SemanticException
setValueExpr(String)
valueColumn
- the name of the query column
SemanticException
- if the property is locked.public java.lang.String getLabelColumn()
getLabelExpr()
public void setLabelColumn(java.lang.String labelColumn) throws SemanticException
setLabelExpr(String)
labelColumn
- the name of the query column
SemanticException
- if the property is locked.public java.lang.String getType()
getDataType()
DesignChoiceConstants
can be one of the followings:
PARAM_TYPE_STRING
PARAM_TYPE_FLOAT
PARAM_TYPE_DECIMAL
PARAM_TYPE_INTEGER
PARAM_TYPE_DATETYPE
PARAM_TYPE_BOOLEAN
setType(String)
,
DesignChoiceConstants
public void setType(java.lang.String type) throws SemanticException
setDataType(String)
DesignChoiceConstants
can be one of the followings:
PARAM_TYPE_STRING
PARAM_TYPE_FLOAT
PARAM_TYPE_DECIMAL
PARAM_TYPE_INTEGER
PARAM_TYPE_DATETYPE
PARAM_TYPE_BOOLEAN
type
- the type for the parameter
SemanticException
- if the input type is not one of above choices.getType()
,
DesignChoiceConstants
public java.lang.String getValueType()
DesignChoiceConstants
can be one of the followings:
PARAM_VALUE_TYPE_STATIC
PARAM_VALUE_TYPE_DYNAMIC
setValueType(String)
,
DesignChoiceConstants
public void setValueType(java.lang.String type) throws SemanticException
DesignChoiceConstants
can be one of the
followings:
PARAM_TYPE_STATIC
PARAM_TYPE_DYNAMIC
type
- the type for the scalar parameter
SemanticException
- if the input type is not one of above choices.getValueType()
,
DesignChoiceConstants
public void setPromptText(java.lang.String promptValue) throws SemanticException
promptValue
- The display prompt context.
SemanticException
public java.lang.String getPromptText()
public void setPromptTextID(java.lang.String promptIDValue) throws SemanticException
promptIDValue
- The prompt text ID.
SemanticException
public java.lang.String getPromptTextID()
public java.lang.String getDisplayPromptText()
public void setListlimit(int listLimit) throws SemanticException
listLimit
- The limited number.
SemanticException
public int getListlimit()
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 column
ComputedColumnHandle
or the
existed ComputedColumnHandle
in the list
SemanticException
- 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 setIsRequired(boolean isRequired) throws SemanticException
null
or empty. For other type parameters, required value
cannot be null
.
isRequired
- true
if the value is required. Otherwise
false
.
SemanticException
- if the property is locked.public boolean isRequired()
null
or empty. For other type parameters, required value cannot be
null
.
true
if the value is required. Otherwise
false
.public void setDistinct(boolean distinct) throws SemanticException
distinct
- true
if duplicate values only show once.
Otherwise false
.
SemanticException
- if the property is locked.public boolean distinct()
true
if duplicate values only show once. Otherwise
false
.public void setSortDirection(java.lang.String direction) throws SemanticException
null
direction
-
SemanticException
- if the property is locked.public java.lang.String getSortDirection()
null
public void setSortBy(java.lang.String sortValue) throws SemanticException
sortValue
-
SemanticException
- if the property is locked.public java.lang.String getSortBy()
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 set
SemanticException
- 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 interest
DesignElementHandle.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 parameter
SemanticException
- 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 void setSortByColumn(java.lang.String sortByColumn) throws SemanticException
sortByColumn
- expression by which the result sorts
SemanticException
public java.lang.String getSortByColumn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |