Package org.hibernate.dialect
Class DB2GetObjectExtractor<T>
java.lang.Object
org.hibernate.type.descriptor.jdbc.BasicExtractor<T>
org.hibernate.type.descriptor.jdbc.internal.GetObjectExtractor<T>
org.hibernate.dialect.DB2GetObjectExtractor<T>
- All Implemented Interfaces:
Serializable,ValueExtractor<T>
Variant of the
GetObjectExtractor that catches a NullPointerException,
because the DB2 JDBC driver runs into that exception when trying to access a null value
with the getObject(int, Class) and getObject(String, Class) methods.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDB2GetObjectExtractor(JavaType<T> javaType, JavaTimeJdbcType jdbcType, Class<?> baseClass) -
Method Summary
Modifier and TypeMethodDescriptionprotected TdoExtract(CallableStatement statement, int paramIndex, WrapperOptions options) Perform the extraction.protected TdoExtract(CallableStatement statement, String name, WrapperOptions options) Perform the extraction.protected TdoExtract(ResultSet rs, int paramIndex, WrapperOptions options) Perform the extraction.Methods inherited from class org.hibernate.type.descriptor.jdbc.BasicExtractor
extract, extract, extract, getJavaType, getJdbcType
-
Constructor Details
-
DB2GetObjectExtractor
-
-
Method Details
-
doExtract
Description copied from class:BasicExtractorPerform the extraction.Called from
BasicExtractor.extract(java.sql.ResultSet, int, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Overrides:
doExtractin classGetObjectExtractor<T>- Returns:
- The extracted value.
- Throws:
SQLException- Indicates a problem access the result set
-
doExtract
protected T doExtract(CallableStatement statement, int paramIndex, WrapperOptions options) throws SQLException Description copied from class:BasicExtractorPerform the extraction.Called from
BasicExtractor.extract(java.sql.ResultSet, int, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Overrides:
doExtractin classGetObjectExtractor<T>- Returns:
- The extracted value.
- Throws:
SQLException- Indicates a problem accessing the parameter value
-
doExtract
protected T doExtract(CallableStatement statement, String name, WrapperOptions options) throws SQLException Description copied from class:BasicExtractorPerform the extraction.Called from
BasicExtractor.extract(java.sql.ResultSet, int, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Overrides:
doExtractin classGetObjectExtractor<T>- 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
-