Class DataSetParameter
java.lang.Object
org.eclipse.birt.report.model.core.Structure
org.eclipse.birt.report.model.core.PropertyStructure
org.eclipse.birt.report.model.api.elements.structures.DataSetParameter
- All Implemented Interfaces:
Cloneable
,IStructure
,org.eclipse.birt.report.model.core.IPropertySet
- Direct Known Subclasses:
OdaDataSetParameter
public class DataSetParameter
extends org.eclipse.birt.report.model.core.PropertyStructure
Represents the parameter for ODA 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.
- Allow Null
- 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
FieldsModifier and TypeFieldDescriptionstatic final String
Name of the member indicating that whether the value of this parameter can benull
.static final String
Name of the parameter data type member.static final String
Name of the parameter default value member.static final String
Name of the member indicating the description id of the parameterstatic final String
Name of the member indicating the description of the parameterstatic final String
Name of the member indicating the display name id of the parameterstatic final String
Name of the member indicating the display name of the parameterstatic final String
Name of the member indicating the heading id of the parameterstatic final String
Name of the member indicating the heading of the parameterstatic final String
Name of the member indicating the help text id of the parameterstatic final String
Name of the member indicating the help text of the parameterstatic final String
Name of the member indicating that whether this is an input parameter.static final String
Deprecated.static final String
Name of the member indicating that whether the report must provide a value for this parameter.static final String
Name of the member indicating that whether this is an output parameter.static final String
Name of the parameter name member.static final String
Name of the member indicating the native (database) data type code.static final String
Name of the position member.static final String
Name of this structure.Fields inherited from class org.eclipse.birt.report.model.core.PropertyStructure
propValues
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the value of this parameter can benull
.Returns the parameter data type.Gets the default value of the input parameter.Gets the description of this parameter.Gets the resource key of the description of this parameter.Gets the display name of this parameter.Gets the resource key of the display name of this parameter.Gets the heading of this parameter.Gets the resource key of the heading of this parameter.Gets the help text of this parameter.Gets the resource key of the help text of this parameter.getName()
Returns the parameter name.Returns the native data type.Returns the data type in parameter type choices of this parameter.Returns the position of this parameter.Returns the name of the structure definition.handle
(SimpleValueHandle valueHandle, int index) Creates the specific handle of this structure.boolean
isInput()
Checks whether this parameter is an input parameter.boolean
Deprecated.boolean
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 benull
.void
setDataType
(String dataType) Sets the parameter data type.void
setDefaultValue
(String expr) Sets the default value of the input parameter.void
setDescription
(String description) Sets the description of this parameter.void
setDescriptionKey
(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 id 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.UsesetAllowNull(boolean)
void
setIsOptional
(boolean value) Sets whether the parameter is optional.void
setIsOutput
(boolean isOutput) Sets whether this parameter is an output parameter.void
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.validate
(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Validate whether this structure is valid.Methods inherited from class org.eclipse.birt.report.model.core.PropertyStructure
clone, getIntrinsicProperty, getLocalProperty, getLocalProperty, setIntrinsicProperty, setProperty
Methods inherited from class org.eclipse.birt.report.model.core.Structure
checkStringMember, copy, equals, getCompatibleValue, getContext, getDefn, getElement, getExpressionProperty, getHandle, getHandle, getMemberDefn, getObjectDefn, getProperty, getProperty, getReferencableProperty, getStringProperty, isDesignTime, isReferencable, setContext, setExpressionProperty, setProperty, setupContext, updateReference
-
Field Details
-
STRUCT_NAME
Name of this structure. Matches the definition in the meta-data dictionary.- See Also:
-
POSITION_MEMBER
Name of the position member.- See Also:
-
NAME_MEMBER
Name of the parameter name member.- See Also:
-
DATA_TYPE_MEMBER
Name of the parameter data type member.- See Also:
-
IS_OPTIONAL_MEMBER
Name of the member indicating that whether the report must provide a value for this parameter.- See Also:
-
DEFAULT_VALUE_MEMBER
Name of the parameter default value member.- See Also:
-
IS_NULLABLE_MEMBER
Deprecated.Name of the member indicating that whether the value of this parameter can benull
.- See Also:
-
ALLOW_NULL_MEMBER
Name of the member indicating that whether the value of this parameter can benull
.- See Also:
-
IS_INPUT_MEMBER
Name of the member indicating that whether this is an input parameter.- See Also:
-
IS_OUTPUT_MEMBER
Name of the member indicating that whether this is an output parameter.- See Also:
-
NATIVE_DATA_TYPE_MEMBER
Name of the member indicating the native (database) data type code.- See Also:
-
DISPLAY_NAME_MEMBER
Name of the member indicating the display name of the parameter- See Also:
-
DISPLAY_NAME_ID_MEMBER
Name of the member indicating the display name id of the parameter- See Also:
-
HEADING_MEMBER
Name of the member indicating the heading of the parameter- See Also:
-
HEADING_ID_MEMBER
Name of the member indicating the heading id of the parameter- See Also:
-
HELP_TEXT_MEMBER
Name of the member indicating the help text of the parameter- See Also:
-
HELP_TEXT_ID_MEMBER
Name of the member indicating the help text id of the parameter- See Also:
-
DESCRIPTION_MEMBER
Name of the member indicating the description of the parameter- See Also:
-
DESCRIPTION_ID_MEMBER
Name of the member indicating the description id of the parameter- See Also:
-
-
Constructor Details
-
DataSetParameter
public DataSetParameter()
-
-
Method Details
-
getStructName
Description copied from interface:IStructure
Returns the name of the structure definition. The name is the one used to define the structure in the meta-data dictionary.- Returns:
- the internal name of the structure a defined in the meta-data dictionary.
-
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
Sets the default value of the input parameter.- Parameters:
expr
- the default value
-
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. Otherwisefalse
.
-
setIsInput
public void setIsInput(boolean isInput) Sets whether this parameter is an input parameter.- Parameters:
isInput
-true
if it is an input parameter. Otherwisefalse
.
-
isNullable
Deprecated.UseallowNull()
Checks whether the value of this parameter can benull
.- Returns:
true
if the value can benull
. Otherwisefalse
.
-
setIsNullable
Deprecated.UsesetAllowNull(boolean)
Sets whether the value of this parameter can benull
.- Parameters:
isNullable
-true
if the value can benull
. Otherwisefalse
.
-
allowNull
public boolean allowNull()Checks whether the value of this parameter can benull
.- Returns:
true
if the value can benull
. Otherwisefalse
.
-
setAllowNull
public void setAllowNull(boolean allowNull) Sets whether the value of this parameter can benull
.- Parameters:
allowNull
-true
if the value can benull
. Otherwisefalse
.
-
isOutput
public boolean isOutput()Checks whether this parameter is an output parameter.- Returns:
true
if it is an output parameter. Otherwisefalse
.
-
setIsOutput
public void setIsOutput(boolean isOutput) Sets whether this parameter is an output parameter.- Parameters:
isOutput
-true
if it is an output parameter. Otherwisefalse
.
-
getDataType
Returns the parameter data type.- Returns:
- the parameter dataType
-
setDataType
Sets the parameter data type.- Parameters:
dataType
- the data type to set
-
getName
Returns the parameter name.- Returns:
- the parameter name
-
setName
Sets the parameter name.- Parameters:
name
- the name to set
-
getPosition
Returns the position of this parameter.- Returns:
- the position of this parameter
-
setPosition
Sets the position of this parameter.- Parameters:
position
- the position to set
-
handle
Description copied from class:org.eclipse.birt.report.model.core.Structure
Creates the specific handle of this structure. This handle is always created.- Specified by:
handle
in classorg.eclipse.birt.report.model.core.Structure
- Parameters:
valueHandle
- the value handle of this structure list property this structure is inindex
- the position of this structure in structure list- Returns:
- the handle of this structure.
-
validate
public List validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element) Description copied from class:org.eclipse.birt.report.model.core.Structure
Validate whether this structure is valid. The derived class should override this method if semantic check is needed. The each error is the instance ofPropertyValueException
.- Overrides:
validate
in classorg.eclipse.birt.report.model.core.Structure
- Parameters:
module
- the moduleelement
- the element contains this structure- Returns:
- the semantic error list
-
getNativeDataType
Returns the native data type.- Returns:
- the parameter native data type.
-
setNativeDataType
Sets the parameter native data type.- Parameters:
dataType
- the native data type to set.
-
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
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
Gets the display name of this parameter.- Returns:
- the display name of this parameter
-
setDisplayName
Sets the display name of this parameter.- Parameters:
displayName
- the new display name of this parameter
-
getDisplayNameKey
Gets the resource key of the display name of this parameter.- Returns:
- the resource key of the display name
-
setDisplayNameKey
Sets the resource key of the display name id of this parameter.- Parameters:
displayNameID
- the new resource key of the display name
-
getHeading
Gets the heading of this parameter.- Returns:
- the heading of this parameter
-
setHeading
Sets the heading of this parameter.- Parameters:
heading
- the new heading of this parameter
-
getHeadingKey
Gets the resource key of the heading of this parameter.- Returns:
- the resource key of the heading
-
setHeadingKey
Sets the resource key of the heading of this parameter.- Parameters:
headingID
- the new resource key of the heading
-
getHelpText
Gets the help text of this parameter.- Returns:
- the help text of this parameter
-
setHelpText
Sets the help text of this parameter.- Parameters:
helpText
- the new help text of this parameter
-
getHelpTextKey
Gets the resource key of the help text of this parameter.- Returns:
- the resource key of the help text
-
setHelpTextKey
Sets the resource key of the help text of this parameter.- Parameters:
helpTextID
- the new resource key of the heading
-
getDescription
Gets the description of this parameter.- Returns:
- the description of this parameter
-
setDescription
Sets the description of this parameter.- Parameters:
description
- the new description of this parameter
-
getDescriptionKey
Gets the resource key of the description of this parameter.- Returns:
- the resource key
-
setDescriptionKey
Sets the resource key of the description of this parameter.- Parameters:
descriptionID
- the new resource key of the description
-
allowNull()