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>
public class DB2GetObjectExtractor<T> extends GetObjectExtractor<T>
Variant of theGetObjectExtractorthat catches aNullPointerException, because the DB2 JDBC driver runs into that exception when trying to access anullvalue with thegetObject(int, Class)andgetObject(String, Class)methods.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DB2GetObjectExtractor(JavaType<T> javaType, JavaTimeJdbcType jdbcType, Class<?> baseClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 Detail
-
DB2GetObjectExtractor
public DB2GetObjectExtractor(JavaType<T> javaType, JavaTimeJdbcType jdbcType, Class<?> baseClass)
-
-
Method Detail
-
doExtract
protected T doExtract(ResultSet rs, 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 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
-
-