|
||||||||||
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.AbstractScalarParameterHandle
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, FIXED_ORDER_PROP, FORMAT_PROP, GET_DEFAULT_VALUE_LIST_PROP, GET_SELECTION_VALUE_LIST_PROP, MUCH_MATCH_PROP, PARAM_TYPE_PROP |
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IAbstractScalarParameterModel |
---|
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 |
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 |
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 AbstractScalarParameterHandle.isRequired() |
boolean |
allowNull()
Deprecated. by AbstractScalarParameterHandle.isRequired() |
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 AbstractScalarParameterHandle.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 AbstractScalarParameterHandle.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 AbstractScalarParameterHandle.getDataType() |
java.lang.String |
getValueColumn()
Deprecated. Replaced by the method AbstractScalarParameterHandle.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. by AbstractScalarParameterHandle.setIsRequired(boolean) |
void |
setAllowNull(boolean allowNull)
Deprecated. by AbstractScalarParameterHandle.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 |
setDefaultValue(java.lang.String defaultValue)
Deprecated. since 2.5 replaced by AbstractScalarParameterHandle.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 AbstractScalarParameterHandle.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 AbstractScalarParameterHandle.setDataType(String) |
void |
setValueColumn(java.lang.String valueColumn)
Deprecated. Replaced by the method AbstractScalarParameterHandle.setValueExpr(String) |
Methods inherited from class org.eclipse.birt.report.model.api.AbstractScalarParameterHandle |
---|
choiceIterator, distinct, getDataSet, getDataSetName, getDataType, getDefaultValueList, getLabelExpr, getSortBy, getSortByColumn, getSortDirection, getValueExpr, getValueType, isRequired, setDataSetName, setDataType, setDefaultValueList, setDistinct, setIsRequired, setLabelExpr, setListlimit, setSortBy, setSortByColumn, setSortDirection, setValueExpr, setValueType |
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 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 getDefaultValue()
AbstractScalarParameterHandle.getDefaultValueList()
public void setDefaultValue(java.lang.String defaultValue) throws SemanticException
AbstractScalarParameterHandle.setDefaultValueList(List)
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()
AbstractScalarParameterHandle.isRequired()
null
.
true
if the value can be null
,
false
if the value can not be null
.public void setAllowNull(boolean allowNull) throws SemanticException
AbstractScalarParameterHandle.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()
AbstractScalarParameterHandle.isRequired()
null
.
true
if the value can be null
,
false
if the value can not be null
.public void setAllowBlank(boolean allowBlank) throws SemanticException
AbstractScalarParameterHandle.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 int getListlimit()
getListlimit
in class AbstractScalarParameterHandle
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.AbstractScalarParameterHandle.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.lang.String getValueColumn()
AbstractScalarParameterHandle.getValueExpr()
public void setValueColumn(java.lang.String valueColumn) throws SemanticException
AbstractScalarParameterHandle.setValueExpr(String)
valueColumn
- the name of the query column
SemanticException
- if the property is locked.public java.lang.String getLabelColumn()
AbstractScalarParameterHandle.getLabelExpr()
public void setLabelColumn(java.lang.String labelColumn) throws SemanticException
AbstractScalarParameterHandle.setLabelExpr(String)
labelColumn
- the name of the query column
SemanticException
- if the property is locked.public java.lang.String getType()
AbstractScalarParameterHandle.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
AbstractScalarParameterHandle.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 parameter
SemanticException
- 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 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 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 java.lang.String getDefaultValueListMethod()
getDefaultValueList
.
getDefaultValueList
public void setDefaultValueListMethod(java.lang.String getDefaultValueListMethod) throws SemanticException
getDefaultValueList
.
getDefaultValueListMethod
- the method content of getDefaultValueList
to set
SemanticException
public java.lang.String getSelectionValueListMethod()
getSelectionValueList
.
getSelectionValueList
public void setSelectionValueListMethod(java.lang.String getSelectionValueListMethod) throws SemanticException
getSelectionValueList
.
getSelectionValueListMethod
- the method content of getSelectionValueList
to
set
SemanticException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |