Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.data.engine.api.querydefn
Class ParameterDefinition

    java.lang.Object
      org.eclipse.birt.data.engine.api.querydefn.ParameterDefinition

All Implemented Interfaces:
  IParameterDefinition

    public class ParameterDefinition

extends java.lang.Object
implements IParameterDefinition

Default implementation of the `IParameterDefinition` interface.

Constructor Summary
`ParameterDefinition()` Constructs an empty parameter definition
`ParameterDefinition(int position, int type)` Constructs a position-based parameter definition with specified data type
`ParameterDefinition(int position, int type, boolean isInput, boolean isOutput)` Constructs a position-based parameter definition with specified data type, and input/output mode
`ParameterDefinition(java.lang.String name, int type)` Constructs a name-based parameter definition with specified data type
`ParameterDefinition(java.lang.String name, int type, boolean isInput, boolean isOutput)` Constructs a name-based parameter definition with specified data type, and input/output mode

Method Summary
`java.lang.String` | `getDefaultInputValue()` Returns the default input value of this parameter.
`java.lang.String` | `getName()` Returns the parameter name.
`java.lang.String` | `getNativeName()` Returns the native name of the parameter as known to the underlying data source.
`int` | `getNativeType()` Returns the parameter's native data type as defined by the underlying data source.
`int` | `getPosition()` Returns the parameter position.
`int` | `getType()` Returns the parameter data type.
`boolean` | `isInputMode()` Returns whether this parameter is an input parameter.
`boolean` | `isInputOptional()` Specifies whether this parameter is optional.
`boolean` | `isNullable()` Specifies whether null values are allowed for this parameter.
`boolean` | `isOutputMode()` Returns whether this parameter is an output parameter.
`void` | `setDefaultInputValue(java.lang.String defaultValue)` Sets the parameter's default input value.
`void` | `setInputMode(boolean isInput)` Sets the input mode of the parameter.
`void` | `setInputOptional(boolean isOptional)` Sets whether the parameter's input value is optional.
`void` | `setName(java.lang.String name)` Sets the name of the parameter
`void` | `setNativeName(java.lang.String nativeName)` Sets the parameter's native name as known to the underlying ODA driver.
`void` | `setNativeType(int typeCode)` Sets the parameter native data type
`void` | `setNullable(boolean isNullable)` Sets whether the parameter's value can be null.
`void` | `setOutputMode(boolean isOutput)` Sets the output mode of the parameter.
`void` | `setPosition(int posn)` Sets the parameter position
`void` | `setType(int type)` Sets the parameter data type

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ParameterDefinition

    public ParameterDefinition()

  Constructs an empty parameter definition

### ParameterDefinition

    public ParameterDefinition(java.lang.String name,
                               int type)

  Constructs a name-based parameter definition with specified data type

### ParameterDefinition

    public ParameterDefinition(int position,
                               int type)

  Constructs a position-based parameter definition with specified data type

### ParameterDefinition

    public ParameterDefinition(java.lang.String name,
                               int type,
                               boolean isInput,
                               boolean isOutput)

  Constructs a name-based parameter definition with specified data type, and input/output mode

### ParameterDefinition

    public ParameterDefinition(int position,
                               int type,
                               boolean isInput,
                               boolean isOutput)

  Constructs a position-based parameter definition with specified data type, and input/output mode

Method Detail

### getName

    public java.lang.String getName()

  Description copied from interface: `IParameterDefinition`
  Returns the parameter name.

  Specified by:
    `getName` in interface `IParameterDefinition`
  Returns:
    the name of the parameter. Null if parameter is identified by index.
  See Also:
    `IParameterDefinition.getName()`

### setName

    public void setName(java.lang.String name)

  Sets the name of the parameter

### getNativeName

    public java.lang.String getNativeName()

  Description copied from interface: `IParameterDefinition`
  Returns the native name of the parameter as known to the underlying data source.

  Specified by:
    `getNativeName` in interface `IParameterDefinition`
  Returns:
    the parameter native name, or null if the name is not available or this parameter is not named.

### setNativeName

    public void setNativeName(java.lang.String nativeName)

  Sets the parameter's native name as known to the underlying ODA driver. The value may be null for unknown or undefined name.

### getPosition

    public int getPosition()

  Description copied from interface: `IParameterDefinition`
  Returns the parameter position. Parameter positions start from 1.

  Specified by:
    `getPosition` in interface `IParameterDefinition`
  Returns:
    the parameter position. -1 if parameter is identified by name.
  See Also:
    `IParameterDefinition.getPosition()`

### setPosition

    public void setPosition(int posn)

  Sets the parameter position

### getType

    public int getType()

  Description copied from interface: `IParameterDefinition`
  Returns the parameter data type. See the `org.eclipse.birt.core.data.DataType` class for return value constants.

  Specified by:
    `getType` in interface `IParameterDefinition`
  Returns:
    the parameter data type
  See Also:
    `IParameterDefinition.getType()`

### setType

    public void setType(int type)

  Sets the parameter data type

### getNativeType

    public int getNativeType()

  Description copied from interface: `IParameterDefinition`
  Returns the parameter's native data type as defined by the underlying data source. The native data type code value is implementation-specific. Default value is 0 for none or unknown value.

  Specified by:
    `getNativeType` in interface `IParameterDefinition`
  Returns:
    the native data type code of this parameter

### setNativeType

    public void setNativeType(int typeCode)

  Sets the parameter native data type

### isInputMode

    public boolean isInputMode()

  Description copied from interface: `IParameterDefinition`
  Returns whether this parameter is an input parameter. A parameter can be of both input and output modes.

  Specified by:
    `isInputMode` in interface `IParameterDefinition`
  Returns:
    true if this parameter is of input mode, false otherwise.
  See Also:
    `IParameterDefinition.isInputMode()`

### setInputMode

    public void setInputMode(boolean isInput)

  Sets the input mode of the parameter.

  Parameters:
    `isInput` - true if the parameter is of input mode, false otherwise.

### isOutputMode

    public boolean isOutputMode()

  Description copied from interface: `IParameterDefinition`
  Returns whether this parameter is an output parameter. A parameter can be of both input and output modes.

  Specified by:
    `isOutputMode` in interface `IParameterDefinition`
  Returns:
    true if this parameter is of output mode, false otherwise.
  See Also:
    `IParameterDefinition.isOutputMode()`

### setOutputMode

    public void setOutputMode(boolean isOutput)

  Sets the output mode of the parameter.

  Parameters:
    `isOutput` - true if the parameter is of output mode, false otherwise.

### isInputOptional

    public boolean isInputOptional()

  Description copied from interface: `IParameterDefinition`
  Specifies whether this parameter is optional. Applies to the parameter only if it is of input mode.

  Specified by:
    `isInputOptional` in interface `IParameterDefinition`
  Returns:
    true if this parameter is optional, false if this parameter is required.
  See Also:
    `IParameterDefinition.isInputOptional()`

### setInputOptional

    public void setInputOptional(boolean isOptional)

  Sets whether the parameter's input value is optional. Applies to the parameter only if it is of input mode.

  Parameters:
    `isOptional` - true if the parameter input value is optional, false otherwise.

### getDefaultInputValue

    public java.lang.String getDefaultInputValue()

  Description copied from interface: `IParameterDefinition`
  Returns the default input value of this parameter.

  Specified by:
    `getDefaultInputValue` in interface `IParameterDefinition`
  Returns:
    the default value, or null if the default value is not specified or if this is an output only parameter.
  See Also:
    `IParameterDefinition.getDefaultInputValue()`

### setDefaultInputValue

    public void setDefaultInputValue(java.lang.String defaultValue)

  Sets the parameter's default input value. Applies to the parameter only if it is of input mode.

  Parameters:
    `defaultValue` - Default input value.

### isNullable

    public boolean isNullable()

  Description copied from interface: `IParameterDefinition`
  Specifies whether null values are allowed for this parameter.

  Specified by:
    `isNullable` in interface `IParameterDefinition`
  Returns:
    true if this parameter value can be null, false otherwise.
  See Also:
    `IParameterDefinition.isNullable()`

### setNullable

    public void setNullable(boolean isNullable)

  Sets whether the parameter's value can be null.

  Parameters:
    `isNullable` - true if the parameter value can be null, false otherwise.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.