org.eclipse.datatools.enablement.oda.ws.impl
Class ParameterMetaData

java.lang.Object
  extended by org.eclipse.datatools.enablement.oda.ws.impl.ParameterMetaData
All Implemented Interfaces:
IParameterMetaData

public class ParameterMetaData
extends java.lang.Object
implements IParameterMetaData

This class implements the org.eclipse.datatools.connectivity.oda.IParameterMetaData interface.


Field Summary
 
Fields inherited from interface org.eclipse.datatools.connectivity.oda.IParameterMetaData
parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown
 
Constructor Summary
ParameterMetaData(SOAPParameter[] parameters)
           
 
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.
 java.lang.String getParameterName(int param)
          Returns the name of the specific 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterMetaData

public ParameterMetaData(SOAPParameter[] parameters)
Method Detail

getParameterCount

public int getParameterCount()
                      throws OdaException
Description copied from interface: IParameterMetaData
Returns the number of parameters defined in the prepared IQuery object.

Specified by:
getParameterCount in interface IParameterMetaData
Returns:
the number of parameters.
Throws:
OdaException - if data source error occurs.

getParameterMode

public int getParameterMode(int param)
                     throws OdaException
Description copied from interface: IParameterMetaData
Returns the input/output mode of the specified parameter.

Specified by:
getParameterMode in interface IParameterMetaData
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
Description copied from interface: IParameterMetaData
Returns the data provider specific code of the parameter's data type. The valid values are implementation-specific.

Specified by:
getParameterType in interface IParameterMetaData
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
Description copied from interface: IParameterMetaData
Returns the data provider specific name of the parameter's data type.

Specified by:
getParameterTypeName in interface IParameterMetaData
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
Description copied from interface: IParameterMetaData
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.

Specified by:
getPrecision in interface IParameterMetaData
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
Description copied from interface: IParameterMetaData
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.

Specified by:
getScale in interface IParameterMetaData
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
Description copied from interface: IParameterMetaData
Returns whether null values are allowed for the specified parameter.
An optional method.

Specified by:
isNullable in interface IParameterMetaData
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.

getParameterName

public java.lang.String getParameterName(int param)
                                  throws OdaException
Description copied from interface: IParameterMetaData
Returns the name of the specific parameter. Optional method; a parameter may or may not have a name.

Specified by:
getParameterName in interface IParameterMetaData
Parameters:
param - 1-based index of the parameter.
Returns:
the parameter name, or null if the name is not available or this parameter is not named.
Throws:
OdaException - if data source error occurs.