public abstract class BasicExtractor<J> extends java.lang.Object implements ValueExtractor<J>
ValueExtractor
Constructor and Description |
---|
BasicExtractor(JavaTypeDescriptor<J> javaDescriptor,
SqlTypeDescriptor sqlDescriptor) |
Modifier and Type | Method and Description |
---|---|
protected abstract J |
doExtract(java.sql.CallableStatement statement,
int index,
WrapperOptions options)
Perform the extraction.
|
protected abstract J |
doExtract(java.sql.CallableStatement statement,
java.lang.String name,
WrapperOptions options)
Perform the extraction.
|
protected abstract J |
doExtract(java.sql.ResultSet rs,
java.lang.String name,
WrapperOptions options)
Perform the extraction.
|
J |
extract(java.sql.CallableStatement statement,
int index,
WrapperOptions options) |
J |
extract(java.sql.CallableStatement statement,
java.lang.String[] paramNames,
WrapperOptions options) |
J |
extract(java.sql.ResultSet rs,
java.lang.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(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options) throws java.sql.SQLException
ValueExtractor
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 optionsjava.sql.SQLException
- Indicates a JDBC error occurred.protected abstract J doExtract(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options) throws java.sql.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 optionsjava.sql.SQLException
- Indicates a problem access the result setpublic J extract(java.sql.CallableStatement statement, int index, WrapperOptions options) throws java.sql.SQLException
extract
in interface ValueExtractor<J>
java.sql.SQLException
protected abstract J doExtract(java.sql.CallableStatement statement, int index, WrapperOptions options) throws java.sql.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.statement
- The callable statement containing the output parameterindex
- The index (position) of the output parameteroptions
- The binding optionsjava.sql.SQLException
- Indicates a problem accessing the parameter valuepublic J extract(java.sql.CallableStatement statement, java.lang.String[] paramNames, WrapperOptions options) throws java.sql.SQLException
extract
in interface ValueExtractor<J>
java.sql.SQLException
protected abstract J doExtract(java.sql.CallableStatement statement, java.lang.String name, WrapperOptions options) throws java.sql.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.statement
- The callable statement containing the output parametername
- The output parameter nameoptions
- The binding optionsjava.sql.SQLException
- Indicates a problem accessing the parameter valueCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.