public abstract class BasicExtractor<J> extends Object implements ValueExtractor<J>
ValueExtractor
Constructor and Description |
---|
BasicExtractor(JavaTypeDescriptor<J> javaDescriptor,
SqlTypeDescriptor sqlDescriptor) |
Modifier and Type | Method and Description |
---|---|
protected abstract J |
doExtract(ResultSet rs,
String name,
WrapperOptions options)
Perform the extraction.
|
J |
extract(ResultSet rs,
String name,
WrapperOptions options)
Extract value from result set
|
JavaTypeDescriptor<J> |
getJavaDescriptor() |
SqlTypeDescriptor |
getSqlDescriptor() |
public BasicExtractor(JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)
public JavaTypeDescriptor<J> getJavaDescriptor()
public SqlTypeDescriptor getSqlDescriptor()
public J extract(ResultSet rs, String name, WrapperOptions options) throws SQLException
extract
in interface ValueExtractor<J>
rs
- The result set from which to extract the valuename
- The name by which to extract the value from the result setoptions
- The optionsSQLException
- Indicates a JDBC error occurred.protected abstract J doExtract(ResultSet rs, String name, WrapperOptions options) throws SQLException
extract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions)
. Null checking of the value (as well as consulting ResultSet.wasNull()
) is
done there.rs
- The result setname
- The value name in the result setoptions
- The binding optionsSQLException
- Indicates a problem access the result setCopyright © 2012 JBoss by Red Hat. All Rights Reserved.