| Modifier and Type | Field and Description |
|---|---|
static int |
parameterModeIn
Indicates that the parameter mode is
IN. |
static int |
parameterModeInOut
Indicates that the parameter mode is
INOUT. |
static int |
parameterModeOut
Indicates that the parameter mode is
OUT. |
static int |
parameterModeUnknown
Indicates that the parameter mode is not known.
|
static int |
parameterNoNulls
Indicates that a parameter is not permitted to be
NULL. |
static int |
parameterNullable
Indicates that a parameter is permitted to be
NULL. |
static int |
parameterNullableUnknown
Indicates that whether a parameter is allowed to be
null or not
is not known. |
| Modifier and Type | Method and Description |
|---|---|
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. |
int |
getParameterCount()
Gets the number of parameters in the
PreparedStatement for which
this ParameterMetaData contains information. |
int |
getParameterMode(int paramIndex)
Gets the mode of the specified parameter.
|
int |
getParameterType(int paramIndex)
Gets the SQL type of a specified parameter.
|
String |
getParameterTypeName(int paramIndex)
Gets the database-specific type name of a specified parameter.
|
int |
getPrecision(int paramIndex)
Gets the number of decimal digits for a specified parameter.
|
int |
getScale(int paramIndex)
Gets the number of digits after the decimal point for a specified
parameter.
|
int |
isNullable(int paramIndex)
Gets whether
null values are allowed for the specified parameter. |
boolean |
isSigned(int paramIndex)
Gets whether values for the specified parameter can be signed numbers.
|
isWrapperFor, unwrapstatic final int parameterModeIn
IN.static final int parameterModeInOut
INOUT.static final int parameterModeOut
OUT.static final int parameterModeUnknown
static final int parameterNoNulls
NULL.static final int parameterNullable
NULL.static final int parameterNullableUnknown
null or not
is not known.String getParameterClassName(int paramIndex) throws SQLException
PreparedStatement.setObject.paramIndex - the index number of the parameter, where the first parameter
has index 1.SQLException - if a database error happens.int getParameterCount()
throws SQLException
PreparedStatement for which
this ParameterMetaData contains information.SQLException - if a database error happens.int getParameterMode(int paramIndex)
throws SQLException
paramIndex - the index number of the parameter, where the first parameter
has index 1.SQLException - if a database error happens.int getParameterType(int paramIndex)
throws SQLException
paramIndex - the index number of the parameter, where the first parameter
has index 1.java.sql.Types.SQLException - if a database error happens.String getParameterTypeName(int paramIndex) throws SQLException
paramIndex - the index number of the parameter, where the first parameter
has index 1.SQLException - if a database error happens.int getPrecision(int paramIndex)
throws SQLException
paramIndex - the index number of the parameter, where the first parameter
has index 1.0 if the parameter is not a numeric type.SQLException - if a database error happens.int getScale(int paramIndex)
throws SQLException
paramIndex - the index number of the parameter, where the first parameter
has index 1.0 if the parameter is not a numeric type.SQLException - if a database error happens.int isNullable(int paramIndex)
throws SQLException
null values are allowed for the specified parameter.
The returned value is one of:
paramIndex - the index number of the parameter, where the first parameter
has index 1.SQLException - if a database error is encountered.boolean isSigned(int paramIndex)
throws SQLException
paramIndex - the index number of the parameter, where the first parameter
has index 1.true if values can be signed numbers for this parameter,
false otherwise.SQLException - if a database error happens.