Class CallableParameterMetaData
- All Implemented Interfaces:
ParameterMetaData
,Wrapper
-
Field Summary
FieldsFields inherited from interface java.sql.ParameterMetaData
parameterModeIn, parameterModeInOut, parameterModeOut, parameterModeUnknown, parameterNoNulls, parameterNullable, parameterNullableUnknown
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetParameterClassName
(int index) Retrieves the fully-qualified name of the Java class whose instances should be passed to the methodPreparedStatement.setObject
.int
Retrieves the number of parameters in thePreparedStatement
object for which thisParameterMetaData
object contains information.int
getParameterMode
(int index) Retrieves the designated parameter's mode.getParameterName
(int index) int
getParameterType
(int index) Retrieves the designated parameter's SQL type.getParameterTypeName
(int index) Retrieves the designated parameter's database-specific type name.int
getPrecision
(int index) Retrieves the designated parameter's specified column size.int
getScale
(int index) Retrieves the designated parameter's number of digits to right of the decimal point.int
isNullable
(int index) Retrieves whether null values are allowed in the designated parameter.boolean
isSigned
(int index) Retrieves whether values for the designated parameter can be signed numbers.boolean
isWrapperFor
(Class<?> iface) Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.private void
setIndex
(int index) <T> T
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
-
Field Details
-
rs
-
parameterCount
private final int parameterCount -
isFunction
private final boolean isFunction
-
-
Constructor Details
-
CallableParameterMetaData
- Throws:
SQLException
-
-
Method Details
-
getParameterCount
public int getParameterCount()Retrieves the number of parameters in thePreparedStatement
object for which thisParameterMetaData
object contains information.- Specified by:
getParameterCount
in interfaceParameterMetaData
- Returns:
- the number of parameters
- Since:
- 1.4
-
isNullable
Retrieves whether null values are allowed in the designated parameter.- Specified by:
isNullable
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
- the nullability status of the given parameter; one of
ParameterMetaData.parameterNoNulls
,ParameterMetaData.parameterNullable
, orParameterMetaData.parameterNullableUnknown
- Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
-
setIndex
- Throws:
SQLException
-
isSigned
Retrieves whether values for the designated parameter can be signed numbers.- Specified by:
isSigned
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
true
if so;false
otherwise- Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
-
getPrecision
Retrieves the designated parameter's specified column size.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.
- Specified by:
getPrecision
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
- precision
- Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
-
getScale
Retrieves the designated parameter's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable.- Specified by:
getScale
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
- scale
- Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
-
getParameterName
- Throws:
SQLException
-
getParameterType
Retrieves the designated parameter's SQL type.- Specified by:
getParameterType
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
- SQL types from
java.sql.Types
- Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
- See Also:
-
getParameterTypeName
Retrieves the designated parameter's database-specific type name.- Specified by:
getParameterTypeName
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
- type the name used by the database. If the parameter type is a user-defined type, then a fully-qualified type name is returned.
- Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
-
getParameterClassName
Retrieves the fully-qualified name of the Java class whose instances should be passed to the methodPreparedStatement.setObject
.- Specified by:
getParameterClassName
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
- the fully-qualified name of the class in the Java programming language that would be
used by the method
PreparedStatement.setObject
to set the value in the specified parameter. This is the class name used for custom mapping. - Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
-
getParameterMode
Retrieves the designated parameter's mode.- Specified by:
getParameterMode
in interfaceParameterMetaData
- Parameters:
index
- the first parameter is 1, the second is 2, ...- Returns:
- mode of the parameter; one of
ParameterMetaData.parameterModeIn
,ParameterMetaData.parameterModeOut
, orParameterMetaData.parameterModeInOut
ParameterMetaData.parameterModeUnknown
. - Throws:
SQLException
- if a database access error occurs- Since:
- 1.4
-
unwrap
Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.If the receiver implements the interface then the result is the receiver or a proxy for the receiver. If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the wrapped object. Otherwise, return the result of calling
unwrap
recursively on the wrapped object or a proxy for that result. If the receiver is not a wrapper and does not implement the interface, then anSQLException
is thrown.- Specified by:
unwrap
in interfaceWrapper
- Parameters:
iface
- A Class defining an interface that the result must implement.- Returns:
- an object that implements the interface. Maybe a proxy for the actual implementing object.
- Throws:
SQLException
- If no object found that implements the interface- Since:
- 1.6
-
isWrapperFor
Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of recursively callingisWrapperFor
on the wrapped object. If this does not implement the interface and is not a wrapper, return false. This method should be implemented as a low-cost operation compared tounwrap
so that callers can use this method to avoid expensiveunwrap
calls that may fail. If this method returns true then callingunwrap
with the same argument should succeed.- Specified by:
isWrapperFor
in interfaceWrapper
- Parameters:
iface
- a Class defining an interface.- Returns:
- true if this implements the interface or directly or indirectly wraps an object that does.
- Since:
- 1.6
-