| java.sql.ParameterMetaData
ParameterMetaData | public interface ParameterMetaData (Code) | | An interface used to get information about the types and properties of
parameters in a PreparedStatement object.
|
Field Summary | |
final public static int | parameterModeIn Indicates that the parameter mode is IN. | final public static int | parameterModeInOut Indicates that the parameter mode is INOUT. | final public static int | parameterModeOut Indicates that the parameter mode is OUT. | final public static int | parameterModeUnknown Indicates that the parameter mode is not known. | final public static int | parameterNoNulls Indicates that a parameter is not permitted to be NULL. | final public static int | parameterNullable Indicates that a parameter is permitted to be NULL. | final public static int | parameterNullableUnknown Indicates that whether a parameter is allowed to be null or not is not
known. |
Method Summary | |
public String | getParameterClassName(int paramIndex) Gets the fully-qualified name of the Java class which should be passed as
a parameter to the method PreparedStatement.setObject .
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 a String with the fully qualified Java class name of theparameter with the specified index. | public int | getParameterCount() Gets the number of parameters in the PreparedStatement for which this
ParameterMetaData contains information. | public int | getParameterMode(int paramIndex) Gets the mode of the specified parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the parameters mode. | public int | getParameterType(int paramIndex) Gets the SQL type of a specified parameter. | public String | getParameterTypeName(int paramIndex) Gets the database-specific type name of a specified parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the type name for the parameter as used by the database. | public int | getPrecision(int paramIndex) Gets the number of decimal digits for a specified parameter. | public int | getScale(int paramIndex) Gets the number of digits after the decimal point for a specified
parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the number of digits after the decimal point ("the scale") forthe parameter. | public int | isNullable(int paramIndex) Gets whether null values are allowed for the specified parameter. | public boolean | isSigned(int paramIndex) Gets whether values for the specified parameter can be signed numbers. |
parameterModeIn | final public static int parameterModeIn(Code) | | Indicates that the parameter mode is IN.
|
parameterModeInOut | final public static int parameterModeInOut(Code) | | Indicates that the parameter mode is INOUT.
|
parameterModeOut | final public static int parameterModeOut(Code) | | Indicates that the parameter mode is OUT.
|
parameterModeUnknown | final public static int parameterModeUnknown(Code) | | Indicates that the parameter mode is not known.
|
parameterNoNulls | final public static int parameterNoNulls(Code) | | Indicates that a parameter is not permitted to be NULL.
|
parameterNullable | final public static int parameterNullable(Code) | | Indicates that a parameter is permitted to be NULL.
|
parameterNullableUnknown | final public static int parameterNullableUnknown(Code) | | Indicates that whether a parameter is allowed to be null or not is not
known.
|
getParameterClassName | public String getParameterClassName(int paramIndex) throws SQLException(Code) | | Gets the fully-qualified name of the Java class which should be passed as
a parameter to the method PreparedStatement.setObject .
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 a String with the fully qualified Java class name of theparameter with the specified index. This class name is used forcustom mapping. throws: SQLException - if a database error happens |
getParameterCount | public int getParameterCount() throws SQLException(Code) | | Gets the number of parameters in the PreparedStatement for which this
ParameterMetaData contains information.
the number of parameters as an int throws: SQLException - if a database error happens |
getParameterMode | public int getParameterMode(int paramIndex) throws SQLException(Code) | | Gets the mode of the specified parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the parameters mode. Can be: ParameterMetaData.parameterModeIn,ParameterMetaData.parameterModeOut,ParameterMetaData.parameterModeInOut orParameterMetaData.parameterModeUnknown. throws: SQLException - if a database error happens |
getParameterType | public int getParameterType(int paramIndex) throws SQLException(Code) | | Gets the SQL type of a specified parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the type of the parameter - an SQL type as defined injava.sql.Types. throws: SQLException - if a database error happens |
getParameterTypeName | public String getParameterTypeName(int paramIndex) throws SQLException(Code) | | Gets the database-specific type name of a specified parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the type name for the parameter as used by the database. Afully-qualified name is returned if the parameter is a UserDefined Type. throws: SQLException - if a database error happens |
getPrecision | public int getPrecision(int paramIndex) throws SQLException(Code) | | Gets the number of decimal digits for a specified parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the number of decimal digits ("the precision") for the parameter.0 if the parameter is not a numeric type. throws: SQLException - if a database error happens |
getScale | public int getScale(int paramIndex) throws SQLException(Code) | | Gets the number of digits after the decimal point for a specified
parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 the number of digits after the decimal point ("the scale") forthe parameter. 0 if the parameter is not a numeric type. throws: SQLException - if a database error happens |
isNullable | public int isNullable(int paramIndex) throws SQLException(Code) | | Gets whether null values are allowed for the specified parameter.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 indicator of nullability, can be:ParameterMetaData.parameterNoNulls,ParameterMetaData.parameterNullable, orParameterMetaData.parameterNullableUnknown throws: SQLException - if a database error is encountered |
isSigned | public boolean isSigned(int paramIndex) throws SQLException(Code) | | Gets whether values for the specified parameter can be signed numbers.
Parameters: paramIndex - the index number of the parameter, where the first parameterhas an index of 1 true if values can be signed numbers for this parameter, falseotherwise. throws: SQLException - if a database error happens |
|
|