public abstract class

BasicExtractor

extends Object
implements ValueExtractor<X>
java.lang.Object
   ↳ org.hibernate.type.descriptor.sql.BasicExtractor<J>

Class Overview

Convenience base implementation of ValueExtractor

Summary

Public Constructors
BasicExtractor(JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)
Public Methods
J extract(ResultSet rs, String name, WrapperOptions options)
Extract value from result set
JavaTypeDescriptor<J> getJavaDescriptor()
SqlTypeDescriptor getSqlDescriptor()
Protected Methods
abstract J doExtract(ResultSet rs, String name, WrapperOptions options)
Perform the extraction.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.type.descriptor.ValueExtractor

Public Constructors

public BasicExtractor (JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)

Public Methods

public J extract (ResultSet rs, String name, WrapperOptions options)

Extract value from result set

Parameters
rs The result set from which to extract the value
name The name by which to extract the value from the result set
options The options
Returns
  • The extracted value
Throws
SQLException

public JavaTypeDescriptor<J> getJavaDescriptor ()

public SqlTypeDescriptor getSqlDescriptor ()

Protected Methods

protected abstract J doExtract (ResultSet rs, String name, WrapperOptions options)

Perform the extraction.

Called from extract(ResultSet, String, WrapperOptions). Null checking of the value (as well as consulting wasNull()) is done there.

Parameters
rs The result set
name The value name in the result set
options The binding options
Returns
  • The extracted value.
Throws
SQLException Indicates a problem access the result set