Class BasicExtractor<J>
- java.lang.Object
-
- org.hibernate.type.descriptor.jdbc.BasicExtractor<J>
-
- All Implemented Interfaces:
Serializable
,ValueExtractor<J>
- Direct Known Subclasses:
GetObjectExtractor
,SDOGeometryValueExtractor
public abstract class BasicExtractor<J> extends Object implements ValueExtractor<J>, Serializable
Convenience base implementation ofValueExtractor
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BasicExtractor(JavaType<J> javaType, JdbcType jdbcType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract J
doExtract(CallableStatement statement, int index, WrapperOptions options)
Perform the extraction.protected abstract J
doExtract(CallableStatement statement, String name, WrapperOptions options)
Perform the extraction.protected abstract J
doExtract(ResultSet rs, int paramIndex, WrapperOptions options)
Perform the extraction.J
extract(CallableStatement statement, int paramIndex, WrapperOptions options)
Extract value from a callable output parameter by indexJ
extract(CallableStatement statement, String paramName, WrapperOptions options)
Extract value from a callable output parameter by nameJ
extract(ResultSet rs, int paramIndex, WrapperOptions options)
Extract value from result setJavaType<J>
getJavaType()
JdbcType
getJdbcType()
-
-
-
Method Detail
-
getJdbcType
public JdbcType getJdbcType()
-
extract
public J extract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException
Description copied from interface:ValueExtractor
Extract value from result set- Specified by:
extract
in 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:ValueExtractor
Extract value from a callable output parameter by index- Specified by:
extract
in 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:ValueExtractor
Extract value from a callable output parameter by name- Specified by:
extract
in 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
-
-