com.ibm.as400.access
Class AS400JDBCParameterMetaData

java.lang.Object
  extended bycom.ibm.as400.access.AS400JDBCParameterMetaData
All Implemented Interfaces:
ParameterMetaData

public class AS400JDBCParameterMetaData
extends Object
implements ParameterMetaData

The AS400JDBCParameterMetaData class can be used to retrieve information about the parameters of a PreparedStatement. Use PreparedStatement.getParameterMetaData() to create new ParameterMetaData objects.


Field Summary
 
Fields inherited from interface java.sql.ParameterMetaData
parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown
 
Method Summary
 String getParameterClassName(int parameterIndex)
          Returns the fully-qualified name of the Java class of the specified parameter.
 int getParameterCount()
          Returns the number of parameters in this ParameterMetaData object.
 int getParameterMode(int parameterIndex)
          Returns the mode of the specified parameter or if that information is unknown.
 int getParameterType(int parameterIndex)
          Returns the SQL type of the specified parameter.
 String getParameterTypeName(int parameterIndex)
          Returns the database-specific type name of the specified parameter.
 int getPrecision(int parameterIndex)
          Returns the number of decimal digits of the specified parameter.
 int getScale(int parameterIndex)
          Returns the number of digits to the right of the decimal point of the specified parameter.
 int isNullable(int parameterIndex)
          Returns if the specified parameter can be null or that information is unknown.
 boolean isSigned(int parameterIndex)
          Returns if values can be signed numbers for the specified parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParameterClassName

public String getParameterClassName(int parameterIndex)
                             throws SQLException
Returns the fully-qualified name of the Java class of the specified parameter.

Specified by:
getParameterClassName in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
The fully-qualified name of the Java class.
Throws:
SQLException - If the prepared statement is not open.

getParameterCount

public int getParameterCount()
                      throws SQLException
Returns the number of parameters in this ParameterMetaData object.

Specified by:
getParameterCount in interface ParameterMetaData
Returns:
The number of parameters in the ParameterMetaData object.
Throws:
SQLException - If the prepared statement is not open.

getParameterMode

public int getParameterMode(int parameterIndex)
                     throws SQLException
Returns the mode of the specified parameter or if that information is unknown.

Specified by:
getParameterMode in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
The mode of the parameter. Valid values are ParameterMetaData.parameterModeIn, ParameterMetaData.parameterModeOut, ParameterMetaData.parameterModeInOut, and ParameterMetaData.parameterModeUnknown.
Throws:
SQLException - If the prepared statement is not open.

getParameterType

public int getParameterType(int parameterIndex)
                     throws SQLException
Returns the SQL type of the specified parameter.

Specified by:
getParameterType in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
The SQL type of the parameter.
Throws:
SQLException - If the prepared statement is not open.

getParameterTypeName

public String getParameterTypeName(int parameterIndex)
                            throws SQLException
Returns the database-specific type name of the specified parameter.

Specified by:
getParameterTypeName in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
The type name of the parameter.
Throws:
SQLException - If the prepared statement is not open.

getPrecision

public int getPrecision(int parameterIndex)
                 throws SQLException
Returns the number of decimal digits of the specified parameter.

Specified by:
getPrecision in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
The precision of the parameter.
Throws:
SQLException - If the prepared statement is not open.

getScale

public int getScale(int parameterIndex)
             throws SQLException
Returns the number of digits to the right of the decimal point of the specified parameter.

Specified by:
getScale in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
The scale of the parameter.
Throws:
SQLException - If the prepared statement is not open.

isNullable

public int isNullable(int parameterIndex)
               throws SQLException
Returns if the specified parameter can be null or that information is unknown.

Specified by:
isNullable in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
Returns if the parameter can be null. The valid values are ParameterMetaData.parameterNoNulls, ParameterMetaData.parameterNullable, and ParameterMetaData.parameterNullableUnknown.
Throws:
SQLException - If the prepared statement is not open.

isSigned

public boolean isSigned(int parameterIndex)
                 throws SQLException
Returns if values can be signed numbers for the specified parameter.

Specified by:
isSigned in interface ParameterMetaData
Parameters:
parameterIndex - The parameter index (1-based).
Returns:
Returns true if values for the specified parameter can be signed numbers, false otherwise.
Throws:
SQLException - If the prepared statement is not open.