Class BasicExtractor<J>
- java.lang.Object
-
- org.hibernate.type.descriptor.jdbc.BasicExtractor<J>
-
- All Implemented Interfaces:
Serializable,ValueExtractor<J>
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 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.Jextract(CallableStatement statement, int paramIndex, WrapperOptions options)Extract value from a callable output parameter by indexJextract(CallableStatement statement, String paramName, WrapperOptions options)Extract value from a callable output parameter by nameJextract(ResultSet rs, int paramIndex, WrapperOptions options)Extract value from result setJavaType<J>getJavaType()JdbcTypegetJdbcType()
-
-
-
Method Detail
-
getJdbcType
public JdbcType getJdbcType()
-
extract
public J extract(ResultSet rs, int paramIndex, WrapperOptions options) throws SQLException
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 fromextract(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 fromextract(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 fromextract(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
-
-