Package org.eclipse.birt.report.model.api

# Class DataSetParameterHandle

java.lang.Object
org.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.StructureHandle
org.eclipse.birt.report.model.api.DataSetParameterHandle

Direct Known Subclasses:
  `OdaDataSetParameterHandle`

public class DataSetParameterHandle extends StructureHandle
Represents the parameter for data set drivers. The parameter is the part of the data set definition, if defined. A parameter can be an input or output parameter. A parameter can also be input and output parameter. Each data set parameter has the following properties:

Name
  a data set parameter has a required name.
Position
  a data set parameter has an optional position for it.
Data Type
  a data set parameter has a choice data type: any, integer, string, data time, decimal, float, structure or table.
Is optional
  whether this parameter is optional.
Is Nullable
  whether the value of this parameter can be nullable.
Is Input
  whether this parameter is an input parameter.
Is Output
  whether this parameter is an output parameter.

## Field Summary

### Fields inherited from class org.eclipse.birt.report.model.api.StructureHandle

`structContext`

### Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle

`elementHandle`

## Constructor Summary

Constructors
Constructor
Description
`DataSetParameterHandle(SimpleValueHandle valueHandle, int index)`
Constructs the handle of data set parameter.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`allowNull()`
Checks whether the value of this parameter can be `null`.
`String`
`getDataType()`
Returns the data type of this parameter.
`String`
`getDefaultValue()`
Gets the default value of the input parameter.
`String`
`getDescription()`
Gets the description of this parameter.
`String`
`getDescriptionKey()`
Gets the resource key of the description of this parameter.
`String`
`getDisplayName()`
Gets the display name of this parameter.
`String`
`getDisplayNameKey()`
Gets the resource key of the display name of this parameter.
`String`
`getHeading()`
Gets the heading of this parameter.
`String`
`getHeadingKey()`
Gets the resource key of the heading of this parameter.
`String`
`getHelpText()`
Gets the help text of this parameter.
`String`
`getHelpTextKey()`
Gets the resource key of the help text of this parameter.
`MemberHandle`
`getMember(String memberName)`
Returns a handle to a structure member.
`String`
`getName()`
Returns the parameter name.
`Integer`
`getNativeDataType()`
Returns the native data type.
`String`
`getParameterDataType()`
Returns the data type in parameter type choices of this parameter.
`Integer`
`getPosition()`
Returns the position of this parameter in parameter list.
`boolean`
`isInput()`
Checks whether this parameter is an input parameter.
`boolean`
`isNullable()`
Deprecated.
Use `allowNull()`
`boolean`
`isOptional()`
Whether the parameter is optional.
`boolean`
`isOutput()`
Checks whether this parameter is an output parameter.
`void`
`setAllowNull(boolean allowNull)`
Sets whether the value of this parameter can be `null`.
`void`
`setDataType(String dataType)`
Sets the data type of this parameter.
`void`
`setDefaultValue(String expr)`
Sets the default value of the input parameter.
`void`
`setDescription(String description)`
Sets the description of this parameter.
`void`
`setDescriptoinKey(String descriptionID)`
Sets the resource key of the description of this parameter.
`void`
`setDisplayName(String displayName)`
Sets the display name of this parameter.
`void`
`setDisplayNameKey(String displayNameID)`
Sets the resource key of the display name of this parameter.
`void`
`setHeading(String heading)`
Sets the heading of this parameter.
`void`
`setHeadingKey(String headingID)`
Sets the resource key of the heading of this parameter.
`void`
`setHelpText(String helpText)`
Sets the help text of this parameter.
`void`
`setHelpTextKey(String helpTextID)`
Sets the resource key of the help text of this parameter.
`void`
`setIsInput(boolean isInput)`
Sets whether this parameter is an input parameter.
`void`
`setIsNullable(boolean isNullable)`
Deprecated.
Use `setAllowNull(boolean)`
`void`
`setIsOptional(boolean value)`
Sets whether the parameter is optional.
`void`
`setIsOutput(boolean isOutput)`
Sets whether this parameter is an output parameter.
`void`
`setName(String name)`
Sets the parameter name.
`void`
`setNativeDataType(Integer dataType)`
Sets the parameter native data type.
`void`
`setParameterDataType(String dataType)`
Sets the data type in parameter type choices to this parameter.
`void`
`setPosition(Integer position)`
Sets the position of this parameter in parameter list.

### Methods inherited from class org.eclipse.birt.report.model.api.StructureHandle

`drop, getContext, getDefn, getExpressionProperty, getExternalizedValue, getExternalizedValue, getIntProperty, getProperty, getPropertyDefn, getStringProperty, getStructure, isDesignTime, isLocal, iterator, setDesignTime, setExpressionProperty, setProperty, setPropertySilently`

### Methods inherited from class org.eclipse.birt.report.model.api.ValueHandle

`getReference`

### Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle

`getDesign, getElement, getElementHandle, getModule`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DataSetParameterHandle

public DataSetParameterHandle(SimpleValueHandle valueHandle, int index)
Constructs the handle of data set parameter.

Parameters:
  `valueHandle` - the value handle for data set parameter list of one property
  `index` - the position of this data set parameter in the list

## Method Details

### getDataType

public String getDataType()
Returns the data type of this parameter. The possible values are:

- COLUMN_DATA_TYPE_ANY
- COLUMN_DATA_TYPE_INTEGER
- COLUMN_DATA_TYPE_STRING
- COLUMN_DATA_TYPE_DATETIME
- COLUMN_DATA_TYPE_DECIMAL
- COLUMN_DATA_TYPE_FLOAT
- COLUMN_DATA_TYPE_STRUCTURE
- COLUMN_DATA_TYPE_TABLE

Returns:
  the data type of this parameter.

### setDataType

public void setDataType(String dataType) throws SemanticException
Sets the data type of this parameter. The allowed values are:

- COLUMN_DATA_TYPE_ANY
- COLUMN_DATA_TYPE_INTEGER
- COLUMN_DATA_TYPE_STRING
- COLUMN_DATA_TYPE_DATETIME
- COLUMN_DATA_TYPE_DECIMAL
- COLUMN_DATA_TYPE_FLOAT
- COLUMN_DATA_TYPE_STRUCTURE
- COLUMN_DATA_TYPE_TABLE

Parameters:
  `dataType` - the data type to set
Throws:
  `SemanticException` - if the value is not in the above list.

### getName

public String getName()
Returns the parameter name.

Returns:
  the parameter name

### setName

public void setName(String name) throws SemanticException
Sets the parameter name.

Parameters:
  `name` - the name to set
Throws:
  `SemanticException` - value required exception

### getPosition

public Integer getPosition()
Returns the position of this parameter in parameter list.

Returns:
  the position of this parameter.

### setPosition

public void setPosition(Integer position)
Sets the position of this parameter in parameter list.

Parameters:
  `position` - the position to set

### isOptional

public boolean isOptional()
Whether the parameter is optional.

Returns:
  whether the parameter is optional

### setIsOptional

public void setIsOptional(boolean value)
Sets whether the parameter is optional.

Parameters:
  `value` - the value to set

### setDefaultValue

public void setDefaultValue(String expr)
Sets the default value of the input parameter.

Parameters:
  `expr` - the default value

### getDefaultValue

public String getDefaultValue()
Gets the default value of the input parameter.

Returns:
  the default value

### isInput

public boolean isInput()
Checks whether this parameter is an input parameter.

Returns:
  `true` if it is an input parameter. Otherwise `false`.

### setIsInput

public void setIsInput(boolean isInput)
Sets whether this parameter is an input parameter.

Parameters:
  `isInput` - `true` if it is an input parameter. Otherwise `false`.

### isNullable

@Deprecated public boolean isNullable()
Deprecated.
Use `allowNull()`
Checks whether the value of this parameter can be `null`.

Returns:
  `true` if the value can be `null`. Otherwise `false`.

### setIsNullable

@Deprecated public void setIsNullable(boolean isNullable)
Deprecated.
Use `setAllowNull(boolean)`
Sets whether the value of this parameter can be `null`.

Parameters:
  `isNullable` - `true` if the value can be `null`. Otherwise `false`.

### allowNull

public boolean allowNull()
Checks whether the value of this parameter can be `null`.

Returns:
  `true` if the value can be `null`. Otherwise `false`.

### setAllowNull

public void setAllowNull(boolean allowNull)
Sets whether the value of this parameter can be `null`.

Parameters:
  `allowNull` - `true` if the value can be `null`. Otherwise `false`.

### isOutput

public boolean isOutput()
Checks whether this parameter is an output parameter.

Returns:
  `true` if it is an output parameter. Otherwise `false`.

### setIsOutput

public void setIsOutput(boolean isOutput)
Sets whether this parameter is an output parameter.

Parameters:
  `isOutput` - `true` if it is an output parameter. Otherwise `false`.

### getMember

public MemberHandle getMember(String memberName)
Description copied from class: `StructureHandle`
Returns a handle to a structure member.

Overrides:
  `getMember` in class `StructureHandle`
Parameters:
  `memberName` - the name of the member
Returns:
  a handle to the member or `null` if the member is not defined on the structure.

### getNativeDataType

public Integer getNativeDataType()
Returns the native data type.

Returns:
  the parameter native data type.

### setNativeDataType

public void setNativeDataType(Integer dataType)
Sets the parameter native data type.

Parameters:
  `dataType` - the native data type to set.

### getParameterDataType

public String getParameterDataType()
Returns the data type in parameter type choices of this parameter. The possible values are:

- PARAM_TYPE_ANY
- PARAM_TYPE_INTEGER
- PARAM_TYPE_STRING
- PARAM_TYPE_DATETIME
- PARAM_TYPE_DECIMAL
- PARAM_TYPE_FLOAT
- PARAM_TYPE_BOOLEAN

Returns:
  the data type of this parameter.

### setParameterDataType

public void setParameterDataType(String dataType) throws SemanticException
Sets the data type in parameter type choices to this parameter. The allowed values are:

- PARAM_TYPE_ANY
- PARAM_TYPE_INTEGER
- PARAM_TYPE_STRING
- PARAM_TYPE_DATETIME
- PARAM_TYPE_DECIMAL
- PARAM_TYPE_FLOAT
- PARAM_TYPE_BOOLEAN

Parameters:
  `dataType` - the data type to set
Throws:
  `SemanticException` - if the value is not in the above list.

### getDisplayName

public String getDisplayName()
Gets the display name of this parameter.

Returns:
  the display name of this parameter

### setDisplayName

public void setDisplayName(String displayName)
Sets the display name of this parameter.

Parameters:
  `displayName` - the new display name of this parameter

### getDisplayNameKey

public String getDisplayNameKey()
Gets the resource key of the display name of this parameter.

Returns:
  the resource key of the display name

### setDisplayNameKey

public void setDisplayNameKey(String displayNameID)
Sets the resource key of the display name of this parameter.

Parameters:
  `displayNameID` - the new resource key of the display name

### getHeading

public String getHeading()
Gets the heading of this parameter.

Returns:
  the heading of this parameter

### setHeading

public void setHeading(String heading)
Sets the heading of this parameter.

Parameters:
  `heading` - the new heading of this parameter

### getHeadingKey

public String getHeadingKey()
Gets the resource key of the heading of this parameter.

Returns:
  the resource key of the heading

### setHeadingKey

public void setHeadingKey(String headingID)
Sets the resource key of the heading of this parameter.

Parameters:
  `headingID` - the new resource key of the heading

### getHelpText

public String getHelpText()
Gets the help text of this parameter.

Returns:
  the help text of this parameter

### setHelpText

public void setHelpText(String helpText)
Sets the help text of this parameter.

Parameters:
  `helpText` - the new help text of this parameter

### getHelpTextKey

public String getHelpTextKey()
Gets the resource key of the help text of this parameter.

Returns:
  the resource key of the help text

### setHelpTextKey

public void setHelpTextKey(String helpTextID)
Sets the resource key of the help text of this parameter.

Parameters:
  `helpTextID` - the new resource key of the help text

### getDescription

public String getDescription()
Gets the description of this parameter.

Returns:
  the description of this parameter

### setDescription

public void setDescription(String description)
Sets the description of this parameter.

Parameters:
  `description` - the new description of this parameter

### getDescriptionKey

public String getDescriptionKey()
Gets the resource key of the description of this parameter.

Returns:
  the resource key of the description

### setDescriptoinKey

public void setDescriptoinKey(String descriptionID)
Sets the resource key of the description of this parameter.

Parameters:
  `descriptionID` - the new resource key of the description