## org.eclipse.datatools.connectivity.oda
Interface IParameterMetaData

public interface IParameterMetaData

An interface that represents the meta-data of input/output parameters defined in a prepared query. Its implementation is required only if the driver supports query parameters.

Note: All parameter indices in this interface are 1-based.

Field Summary
`static int` `parameterModeIn` The constant indicating that the parameter is an input parameter.
`static int` `parameterModeInOut` The constant indicating that the parameter is both input and output.
`static int` `parameterModeOut` The constant indicating that the parameter is an output parameter.
`static int` `parameterModeUnknown` The constant indicating that the input/output mode of the parameter is unknown.
`static int` `parameterNoNulls` The constant indicating that the parameter will not allow NULL values.
`static int` `parameterNullable` The constant indicating that the parameter will allow NULL values.
`static int` `parameterNullableUnknown` The constant indicating that the nullability of the parameter is unknown.

Method Summary
`int` `getParameterCount()` Returns the number of parameters defined in the prepared IQuery object.
`int` `getParameterMode(int param)` Returns the input/output mode of the specified parameter.
`int` `getParameterType(int param)` Returns the data provider specific code of the parameter's data type.
`java.lang.String` `getParameterTypeName(int param)` Returns the data provider specific name of the parameter's data type.
`int` `getPrecision(int param)` Returns the maximum number of decimal digits for the specified parameter.
`int` `getScale(int param)` Returns the maximum number of digits to the right of the decimal point for the specified parameter.
`int` `isNullable(int param)` Returns whether null values are allowed for the specified parameter.

Field Detail

### parameterModeUnknown

    public static final int parameterModeUnknown

  The constant indicating that the input/output mode of the parameter is unknown.

  See Also:
    Constant Field Values

### parameterModeIn

    public static final int parameterModeIn

  The constant indicating that the parameter is an input parameter.

  See Also:
    Constant Field Values

### parameterModeInOut

    public static final int parameterModeInOut

  The constant indicating that the parameter is both input and output.

  See Also:
    Constant Field Values

### parameterModeOut

    public static final int parameterModeOut

  The constant indicating that the parameter is an output parameter.

  See Also:
    Constant Field Values

### parameterNullableUnknown

    public static final int parameterNullableUnknown

  The constant indicating that the nullability of the parameter is unknown.

  See Also:
    Constant Field Values

### parameterNoNulls

    public static final int parameterNoNulls

  The constant indicating that the parameter will not allow NULL values.

  See Also:
    Constant Field Values

### parameterNullable

    public static final int parameterNullable

  The constant indicating that the parameter will allow NULL values.

  See Also:
    Constant Field Values

Method Detail

### getParameterCount

    public int getParameterCount()
                          throws OdaException

  Returns the number of parameters defined in the prepared IQuery object.

  Returns:
    the number of parameters.
  Throws:
    `OdaException` - if data source error occurs.

### getParameterMode

    public int getParameterMode(int param)
                         throws OdaException

  Returns the input/output mode of the specified parameter.

  Parameters:
    `param` - 1-based index of the parameter.
  Returns:
    the input/output mode of the parameter;
    one of parameterModeUnknown,
    parameterModeIn,
    parameterModeInOut,
    parameterModeOut.
  Throws:
    `OdaException` - if data source error occurs.

### getParameterType

    public int getParameterType(int param)
                         throws OdaException

  Returns the data provider specific code of the parameter's data type. The valid values are implementation-specific.

  Parameters:
    `param` - 1-based index of the parameter.
  Returns:
    the native data type code of the parameter.
  Throws:
    `OdaException` - if data source error occurs.

### getParameterTypeName

    public java.lang.String getParameterTypeName(int param)
                                          throws OdaException

  Returns the data provider specific name of the parameter's data type.

  Parameters:
    `param` - 1-based index of the parameter.
  Returns:
    the native data type name of the parameter.
  Throws:
    `OdaException` - if data source error occurs.

### getPrecision

    public int getPrecision(int param)
                     throws OdaException

  Returns the maximum number of decimal digits for the specified parameter. This method should only apply to numeric data types; however, it is up to an ODA data provider to determine those data types that are applicable. The maximum precision allowed on a data type may vary depending on the data provider.
  An optional method.

  Parameters:
    `param` - 1-based index of the parameter.
  Returns:
    the precision of the parameter, or -1 if not applicable.
  Throws:
    `OdaException` - if data source error occurs.

### getScale

    public int getScale(int param)
                 throws OdaException

  Returns the maximum number of digits to the right of the decimal point for the specified parameter. This method should only apply to numeric data types; however, it is up to an ODA data provider to determine those data types that are applicable. The maximum scale allowed on a data type may vary depending on the data provider.
  An optional method.

  Parameters:
    `param` - 1-based index of the parameter.
  Returns:
    the scale of the parameter, or -1 if not applicable.
  Throws:
    `OdaException` - if data source error occurs.

### isNullable

    public int isNullable(int param)
                   throws OdaException

  Returns whether null values are allowed for the specified parameter.
  An optional method.

  Parameters:
    `param` - 1-based index of the parameter.
  Returns:
    the nullability of the parameter;
    one of parameterNullableUnknown,
    parameterNoNulls,
    parameterNullable.
  Throws:
    `OdaException` - if data source error occurs.

Copyright © 2006 Actuate, IBM Corporation, Sybase, Inc. and others. All rights reserved.