Class BasicExtractor<J>
java.lang.Object
org.hibernate.type.descriptor.jdbc.BasicExtractor<J>
- All Implemented Interfaces:
Serializable,ValueExtractor<J>
- Direct Known Subclasses:
GetObjectExtractor
Convenience base implementation of
ValueExtractor- Author:
- Steve Ebersole
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract JdoExtract(CallableStatement statement, int index, WrapperOptions options) Perform the extraction.protected abstract JdoExtract(CallableStatement statement, String name, WrapperOptions options) Perform the extraction.protected abstract JdoExtract(ResultSet rs, int paramIndex, WrapperOptions options) Perform the extraction.extract(CallableStatement statement, int paramIndex, WrapperOptions options) Extract value from a callable output parameter by indexextract(CallableStatement statement, String paramName, WrapperOptions options) Extract value from a callable output parameter by nameextract(ResultSet rs, int paramIndex, WrapperOptions options) Extract value from result set
-
Constructor Details
-
BasicExtractor
-
-
Method Details
-
getJavaType
-
getJdbcType
-
extract
Description copied from interface:ValueExtractorExtract value from result set- Specified by:
extractin interfaceValueExtractor<J>- Throws:
SQLException- Indicates a JDBC error occurred.
-
doExtract
protected abstract J doExtract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException Perform the extraction.Called from
extract(java.sql.ResultSet, int, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Returns:
- The extracted value.
- Throws:
SQLException- Indicates a problem access the result set
-
extract
public J extract(CallableStatement statement, int paramIndex, WrapperOptions options) throws SQLException Description copied from interface:ValueExtractorExtract value from a callable output parameter by index- Specified by:
extractin interfaceValueExtractor<J>- Throws:
SQLException- Indicates a JDBC error occurred.
-
doExtract
protected abstract J doExtract(CallableStatement statement, int index, WrapperOptions options) throws SQLException Perform the extraction.Called from
extract(java.sql.ResultSet, int, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Returns:
- The extracted value.
- Throws:
SQLException- Indicates a problem accessing the parameter value
-
extract
public J extract(CallableStatement statement, String paramName, WrapperOptions options) throws SQLException Description copied from interface:ValueExtractorExtract value from a callable output parameter by name- Specified by:
extractin interfaceValueExtractor<J>- Throws:
SQLException- Indicates a JDBC error occurred.
-
doExtract
protected abstract J doExtract(CallableStatement statement, String name, WrapperOptions options) throws SQLException Perform the extraction.Called from
extract(java.sql.ResultSet, int, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Parameters:
statement- The callable statement containing the output parametername- The output parameter nameoptions- The binding options- Returns:
- The extracted value.
- Throws:
SQLException- Indicates a problem accessing the parameter value
-