org.eclipse.birt.report.model.api
Class ScalarParameterHandle

java.lang.Object
  extended by org.eclipse.birt.report.model.api.DesignElementHandle
      extended by org.eclipse.birt.report.model.api.ReportElementHandle
          extended by org.eclipse.birt.report.model.api.ParameterHandle
              extended by org.eclipse.birt.report.model.api.ScalarParameterHandle
All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel, org.eclipse.birt.report.model.elements.interfaces.IParameterModel, org.eclipse.birt.report.model.elements.interfaces.IScalarParameterModel

public class ScalarParameterHandle
extends ParameterHandle
implements org.eclipse.birt.report.model.elements.interfaces.IScalarParameterModel

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.

See Also:
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 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, getExtends, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getName, getNumberProperty, getPrivateStyle, getPropertyBinding, 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, paste, paste, paste, paste, removeListener, revertToReportItem, revertToTemplate, semanticCheck, setEncryption, setEventHandlerClass, setExtends, setExtendsElement, setExtendsName, setFloatProperty, setIntProperty, setName, setNumberProperty, setProperties, setPropertyBinding, setStringProperty, setStyle, setStyleElement, setStyleName, setValid, shift, showError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalarParameterHandle

public 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. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.

Parameters:
module - the module
element - the model representation of the element
Method Detail

getDataType

public java.lang.String getDataType()
Returns the data type for this parameter. The data type controls how the requester formats, parses and validates the parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Returns:
the type for the parameter
See Also:
setDataType(String), DesignChoiceConstants

setDataType

public void setDataType(java.lang.String type)
                 throws SemanticException
Sets the data type for this parameter. The data type controls how the Requester formats, parses and validates the parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Parameters:
type - the type for the parameter
Throws:
SemanticException - if the input type is not one of above choices.
See Also:
getDataType(), DesignChoiceConstants

getDefaultValue

public java.lang.String getDefaultValue()
Returns the default value of the parameter. The default value can be an expression, but cannot reference any other parameters.

Returns:
the default value

setDefaultValue

public void setDefaultValue(java.lang.String defaultValue)
                     throws SemanticException
Sets the default value of the parameter. The default value can be an expression, but cannot reference any other parameters.

Parameters:
defaultValue - the default value for the parameter
Throws:
SemanticException - if the property is locked.

isConcealValue

public boolean isConcealValue()
Tests whether hides the user's entry by displaying asterisks. Often used for passwords.

Returns:
true if hides the user's entry by asterisks, false if shows characters as usual.

setConcealValue

public void setConcealValue(boolean concealValue)
                     throws SemanticException
Sets the attribute that's hides the user's entry by displaying asterisks. Often used for passwords.

Parameters:
concealValue - true if hides the user's entry by asterisks, false if shows characters as usual.
Throws:
SemanticException - if the property is locked.

allowNull

public boolean allowNull()
Deprecated. by isRequired()

Tests whether the value of the parameter can be null.

Returns:
true if the value can be null, false if the value can not be null.

setAllowNull

public void setAllowNull(boolean allowNull)
                  throws SemanticException
Deprecated. by setIsRequired(boolean)

Sets the flag that indicates whether the value of the parameter can be null.

Parameters:
allowNull - true if the value can be null, false if the value can not be null.
Throws:
SemanticException - if the property is locked.

allowBlank

public boolean allowBlank()
Deprecated. by isRequired()

Tests whether the string value of the parameter can be null.

Returns:
true if the value can be null, false if the value can not be null.

setAllowBlank

public void setAllowBlank(boolean allowBlank)
                   throws SemanticException
Deprecated. by setIsRequired(boolean)

Sets the flag that indicates whether the string value of the parameter can be null.

Parameters:
allowBlank - true if the value can be null, false if the value can not be null.
Throws:
SemanticException - if the property is locked.

getFormat

public java.lang.String getFormat()
Deprecated. replaced by getPattern and getCategory.

Returns the format instructions for the parameter value. The format is used by the UI to display the value.

Returns:
the format for the parameter value

getPattern

public java.lang.String getPattern()
Returns the pattern of format instructions for the parameter value. The format is used by the UI to display the value.

Returns:
the pattern of format for the parameter value

getCategory

public java.lang.String getCategory()
Returns the category for the parameter format. The format is used by the UI to display the value.

Returns:
the category for the parameter format

setFormat

public void setFormat(java.lang.String format)
               throws SemanticException
Deprecated. replaced by setPattern and setCategory.

Sets the format instructions for the parameter value. The format is used by the UI to display the value.

Parameters:
format - the format for the parameter value
Throws:
SemanticException - if the property is locked.

setPattern

public void setPattern(java.lang.String pattern)
                throws SemanticException
Sets the pattern of format instructions for the parameter value. The format is used by the UI to display the value.

Parameters:
pattern - the format for the parameter value
Throws:
SemanticException - if the property is locked.

setCategory

public void setCategory(java.lang.String category)
                 throws SemanticException
Sets the category for the parameter format. The format is used by the UI to display the value.

Parameters:
category - the category for the format
Throws:
SemanticException - if the property is locked.

getControlType

public java.lang.String getControlType()
Returns the control type for this parameter. Control types are one of constants defined in DesignChoiceConstants:

Returns:
the control type for the UI to display the parameter
See Also:
DesignChoiceConstants

setControlType

public void setControlType(java.lang.String controlType)
                    throws SemanticException
Sets the control type for this parameter. Control types are one of constants defined in DesignChoiceConstants:

Parameters:
controlType - the control type for the UI to display the parameter
Throws:
SemanticException - if the input type is not one of above choices.
See Also:
getDataType(), DesignChoiceConstants

getAlignment

public java.lang.String getAlignment()
Returns the alignment for this parameter. Alignments can be one of the constants defined in DesignChoiceConstants:

Returns:
the alignment for the UI to display the parameter
See Also:
DesignChoiceConstants

setAlignment

public void setAlignment(java.lang.String align)
                  throws SemanticException
Sets the alignment for this parameter. Alignments can be one of the constants defined in DesignChoiceConstants:

Parameters:
align - the alignment for the UI to display the parameter
Throws:
SemanticException - if the input type is not one of above choices.
See Also:
DesignChoiceConstants

isMustMatch

public boolean isMustMatch()
Tests whether the value must match one of values in the selection list.

Returns:
true if the value must match one of values in the list, otherwise false.

setMustMatch

public void setMustMatch(boolean mustMatch)
                  throws SemanticException
Sets the flag indicates that whether the value must match one of values in the selection list.

Parameters:
mustMatch - true if the value must match one of values in the list, otherwise false.
Throws:
SemanticException - if the property is locked.

isFixedOrder

public boolean isFixedOrder()
Tests whether to display values in the order defined in the list.

Returns:
true if to display value in the order, otherwise false.

setFixedOrder

public void setFixedOrder(boolean fixedOrder)
                   throws SemanticException
Sets the flag indicates that whether to display values in the order defined in the list.

Parameters:
fixedOrder - true if to display values in the order, otherwise false.
Throws:
SemanticException - if the property is locked.

choiceIterator

public java.util.Iterator choiceIterator()
Returns the iterator for the static selection list defined on this scalar parameter. Each element in the iterator is the an instance of SelectionChoiceHandle.

Returns:
the iterator for selection list defined on this scalar parameter.
See Also:
SelectionChoice

getDataSetName

public java.lang.String getDataSetName()
Returns the data set name of the dynamic list for this parameter.

Returns:
the data set name of the dynamic list

getDataSet

public DataSetHandle 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, return null.

Returns:
the handle to the data set

setDataSetName

public void setDataSetName(java.lang.String dataSetName)
                    throws SemanticException
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.

getValueExpr

public java.lang.String 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

public void setValueExpr(java.lang.String valueExpr)
                  throws SemanticException
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

public java.lang.String 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

public void setLabelExpr(java.lang.String labelExpr)
                  throws SemanticException
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.

getValueColumn

public java.lang.String getValueColumn()
Deprecated. Replaced by the method getValueExpr()

Returns the name of the query column that returns values for the choice of the dynamic list for this parameter.

Returns:
the the name of the query column

setValueColumn

public void setValueColumn(java.lang.String valueColumn)
                    throws SemanticException
Deprecated. Replaced by the method setValueExpr(String)

Sets the name of the query column that returns values for the choice of the dynamic list for this parameter.

Parameters:
valueColumn - the name of the query column
Throws:
SemanticException - if the property is locked.

getLabelColumn

public java.lang.String getLabelColumn()
Deprecated. Replaced by the method getLabelExpr()

Returns the name of the query column that returns the prompt for the choice of the dynamic list for this parameter.

Returns:
the the name of the query column

setLabelColumn

public void setLabelColumn(java.lang.String labelColumn)
                    throws SemanticException
Deprecated. Replaced by the method setLabelExpr(String)

Sets the name of the query column that returns the prompt for the choice of the dynamic list for this parameter.

Parameters:
labelColumn - the name of the query column
Throws:
SemanticException - if the property is locked.

getType

public java.lang.String getType()
Deprecated. Replaced by the method getDataType()

Returns the data type for this parameter. The data type controls how the requester formats, parses and validates the parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Returns:
the type for the parameter
See Also:
setType(String), DesignChoiceConstants

setType

public void setType(java.lang.String type)
             throws SemanticException
Deprecated. Replaced by the method setDataType(String)

Sets the data type for this parameter. The data type controls how the Requester formats, parses and validates the parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Parameters:
type - the type for the parameter
Throws:
SemanticException - if the input type is not one of above choices.
See Also:
getType(), DesignChoiceConstants

getValueType

public java.lang.String getValueType()
Returns the parameter type for this scalar parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Returns:
the type for the scalar parameter
See Also:
setValueType(String), DesignChoiceConstants

setValueType

public void setValueType(java.lang.String type)
                  throws SemanticException
Sets the parameter value type for this scalar parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Parameters:
type - the type for the scalar parameter
Throws:
SemanticException - if the input type is not one of above choices.
See Also:
getValueType(), DesignChoiceConstants

setPromptText

public void setPromptText(java.lang.String promptValue)
                   throws SemanticException
Set the value for the display prompt context.

Parameters:
promptValue - The display prompt context.
Throws:
SemanticException

getPromptText

public java.lang.String getPromptText()
get the display prompt text.

Returns:
the display prompt.

setPromptTextID

public void setPromptTextID(java.lang.String promptIDValue)
                     throws SemanticException
Set the value for the prompt text ID.

Parameters:
promptIDValue - The prompt text ID.
Throws:
SemanticException

getPromptTextID

public java.lang.String getPromptTextID()
Returns the prompt text ID.

Returns:
the prompt text ID.

getDisplayPromptText

public java.lang.String getDisplayPromptText()
Returns the localized text for prompt text. If the localized text for the text resource key is found, it will be returned. Otherwise, the static text will be returned.

Returns:
the localized text for the prompt text

setListlimit

public void setListlimit(int listLimit)
                  throws SemanticException
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.

columnBindingsIterator

public java.util.Iterator columnBindingsIterator()
Returns the bound columns that binds the data set columns. The item in the iterator is the corresponding ComputedColumnHandle.

Returns:
a list containing the bound columns.

getColumnBindings

public PropertyHandle getColumnBindings()
Get a handle to deal with the bound column.

Returns:
a handle to deal with the bound data column.

addColumnBinding

public ComputedColumnHandle addColumnBinding(ComputedColumn addColumn,
                                             boolean inForce)
                                      throws SemanticException
Adds a bound column to the list.

Parameters:
addColumn - the bound column to add
inForce - true the column is added to the list regardless of duplicate expression. false do not add the column if the expression already exist
column - the bound column
Returns:
the newly created ComputedColumnHandle or the existed ComputedColumnHandle in the list
Throws:
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.

removedUnusedColumnBindings

public void removedUnusedColumnBindings()
                                 throws SemanticException
Removed unused bound columns from the parameter. Bound columns of nested elements will not be removed.

Throws:
SemanticException - if bound column property is locked.

setIsRequired

public void setIsRequired(boolean isRequired)
                   throws SemanticException
Sets the flag that indicates whether the value of the parameter is required. For string type parameter, if the value is required, it cannot be null or empty. For other type parameters, required value cannot be null.

Parameters:
isRequired - true if the value is required. Otherwise false.
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 be null or empty. For other type parameters, required value cannot be null.

Returns:
true if the value is required. Otherwise false.

setDistinct

public void setDistinct(boolean distinct)
                 throws SemanticException
Sets the flag that indicates whether duplicate values should be shown when preview.

Parameters:
distinct - true if duplicate values only show once. Otherwise false.
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. Otherwise false.

setSortDirection

public void setSortDirection(java.lang.String direction)
                      throws SemanticException
Sets the sort order for parameter values when preview. The input argument can be

Parameters:
direction -
Throws:
SemanticException - if the property is locked.

getSortDirection

public java.lang.String getSortDirection()
Gets the sort order for parameter values when preview. The return value can be

Returns:
the sort order for parameter values

setSortBy

public void setSortBy(java.lang.String sortValue)
               throws SemanticException
Sets the sort key for parameter values when preview. The input argument can be

Parameters:
sortValue -
Throws:
SemanticException - if the property is locked.

getSortBy

public java.lang.String getSortBy()
Gets the sort key for parameter values when preview. The return value can be

Returns:
the sort key for parameter values

setProperty

public void setProperty(java.lang.String propName,
                        java.lang.Object value)
                 throws SemanticException
Description copied from class: DesignElementHandle
Sets the value of a property from a generic object. The value can be any of the supported types: String, Double, Integer, BigDecimal or one of the specialized property types. The type of object allowed depends on the type of the property.

Overrides:
setProperty in class DesignElementHandle
Parameters:
propName - the property name
value - the value to set
Throws:
SemanticException - if the property is undefined on the element or the value is invalid.

getProperty

public java.lang.Object getProperty(java.lang.String propName)
Description copied from class: DesignElementHandle
Returns the value of a property as a generic object. The value is the internal property value, it is not localized. For a property with the element reference type, the reference element name is returned.

Overrides:
getProperty in class DesignElementHandle
Parameters:
propName - the name of the property of interest
Returns:
the value of the property. The type of the returned object depends on the property type.
See Also:
DesignElementHandle.getIntProperty(java.lang.String), DesignElementHandle.getStringProperty(java.lang.String), DesignElementHandle.getFloatProperty(java.lang.String), DesignElementHandle.getNumberProperty(java.lang.String)

getParamType

public java.lang.String getParamType()
Returns the parameter type for this scalar parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Returns:
the type for the parameter
See Also:
setParamType(String), DesignChoiceConstants

setParamType

public void setParamType(java.lang.String type)
                  throws SemanticException
Sets the parameter type for this scalar parameter. Types are defined in DesignChoiceConstants can be one of the followings:

Parameters:
type - the type for the parameter
Throws:
SemanticException - if the input type is not one of above choices.
See Also:
getParamType(), DesignChoiceConstants

getAutoSuggestThreshold

public int getAutoSuggestThreshold()
Returns the maximal number of of entries a report parameter pick list can have.

Returns:
the threshold number.

setAutoSuggestThreshold

public void setAutoSuggestThreshold(int number)
                             throws SemanticException
Sets the maximal number of of entries a report parameter pick list can have.

Parameters:
number - the threshold number.
Throws:
SemanticException

setSortByColumn

public void setSortByColumn(java.lang.String sortByColumn)
                     throws SemanticException
Sets the expression by which the result sorts.

Parameters:
sortByColumn - expression by which the result sorts
Throws:
SemanticException

getSortByColumn

public java.lang.String getSortByColumn()
Gets the expression by which the result sorts.

Returns:
the expression by which the result sorts


Copyright © 2008 Actuate Corp. All rights reserved.