| Java™ Platform Standard Ed. 6 | ||||||||||
public interfaceParameterMetaData
An object that can be used to get information about the types and properties for each parameter marker in aPreparedStatement object. For some queries and driver implementations, the data that would be returned by aParameterMetaData object may not be available until thePreparedStatement has been executed.
Some driver implementations may not be able to provide information about the types and properties for each parameter marker in aCallableStatement object.
parameterModeInThe constant indicating that the parameter's mode is IN. | |
parameterModeInOutThe constant indicating that the parameter's mode is INOUT. | |
parameterModeOutThe constant indicating that the parameter's mode is OUT. | |
parameterModeUnknownThe constant indicating that the mode of the parameter is unknown. | |
parameterNoNullsThe constant indicating that a parameter will not allow NULL values. | |
parameterNullableThe constant indicating that a parameter will allow NULL values. | |
parameterNullableUnknownThe constant indicating that the nullability of a parameter is unknown. | |
getParameterClassName(int param)Retrieves the fully-qualified name of the Java class whose instances should be passed to the method PreparedStatement.setObject. | |
getParameterCount()Retrieves the number of parameters in the PreparedStatement object for which thisParameterMetaData object contains information. | |
getParameterMode(int param)Retrieves the designated parameter's mode. | |
getParameterType(int param)Retrieves the designated parameter's SQL type. | |
getParameterTypeName(int param)Retrieves the designated parameter's database-specific type name. | |
getPrecision(int param)Retrieves the designated parameter's specified column size. | |
getScale(int param)Retrieves the designated parameter's number of digits to right of the decimal point. | |
isNullable(int param)Retrieves whether null values are allowed in the designated parameter. | |
isSigned(int param)Retrieves whether values for the designated parameter can be signed numbers. | |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor,unwrap |
static final intparameterNoNulls
NULL values.static final intparameterNullable
NULL values.static final intparameterNullableUnknown
static final intparameterModeUnknown
static final intparameterModeIn
static final intparameterModeInOut
static final intparameterModeOut
intgetParameterCount() throwsSQLException
PreparedStatement object for which thisParameterMetaData object contains information.SQLException - if a database access error occursintisNullable(int param) throwsSQLException
param - the first parameter is 1, the second is 2, ...ParameterMetaData.parameterNoNulls,ParameterMetaData.parameterNullable, orParameterMetaData.parameterNullableUnknownSQLException - if a database access error occursbooleanisSigned(int param) throwsSQLException
param - the first parameter is 1, the second is 2, ...true if so;false otherwiseSQLException - if a database access error occursintgetPrecision(int param) throwsSQLException
The returned value represents the maximum column size for the given parameter. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. 0 is returned for data types where the column size is not applicable.
param - the first parameter is 1, the second is 2, ...SQLException - if a database access error occursintgetScale(int param) throwsSQLException
param - the first parameter is 1, the second is 2, ...SQLException - if a database access error occursintgetParameterType(int param) throwsSQLException
param - the first parameter is 1, the second is 2, ...java.sql.TypesSQLException - if a database access error occursTypesStringgetParameterTypeName(int param) throwsSQLException
param - the first parameter is 1, the second is 2, ...SQLException - if a database access error occursStringgetParameterClassName(int param) throwsSQLException
PreparedStatement.setObject.param - the first parameter is 1, the second is 2, ...PreparedStatement.setObject to set the value in the specified parameter. This is the class name used for custom mapping.SQLException - if a database access error occursintgetParameterMode(int param) throwsSQLException
param - the first parameter is 1, the second is 2, ...ParameterMetaData.parameterModeIn,ParameterMetaData.parameterModeOut, orParameterMetaData.parameterModeInOutParameterMetaData.parameterModeUnknown.SQLException - if a database access error occurs| Java™ Platform Standard Ed. 6 | ||||||||||