Class BasicExtractor<J>
- java.lang.Object
-
- org.hibernate.type.descriptor.sql.BasicExtractor<J>
-
- All Implemented Interfaces:
ValueExtractor<J>
public abstract class BasicExtractor<J> extends java.lang.Object implements ValueExtractor<J>
Convenience base implementation ofValueExtractor
-
-
Constructor Summary
Constructors Constructor Description BasicExtractor(JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract JdoExtract(java.sql.CallableStatement statement, int index, WrapperOptions options)Perform the extraction.protected abstract JdoExtract(java.sql.CallableStatement statement, java.lang.String name, WrapperOptions options)Perform the extraction.protected abstract JdoExtract(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options)Perform the extraction.Jextract(java.sql.CallableStatement statement, int index, WrapperOptions options)Jextract(java.sql.CallableStatement statement, java.lang.String[] paramNames, WrapperOptions options)Jextract(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options)Extract value from result setJavaTypeDescriptor<J>getJavaDescriptor()SqlTypeDescriptorgetSqlDescriptor()
-
-
-
Constructor Detail
-
BasicExtractor
public BasicExtractor(JavaTypeDescriptor<J> javaDescriptor, SqlTypeDescriptor sqlDescriptor)
-
-
Method Detail
-
getJavaDescriptor
public JavaTypeDescriptor<J> getJavaDescriptor()
-
getSqlDescriptor
public SqlTypeDescriptor getSqlDescriptor()
-
extract
public J extract(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options) throws java.sql.SQLException
Description copied from interface:ValueExtractorExtract value from result set- Specified by:
extractin interfaceValueExtractor<J>- Parameters:
rs- The result set from which to extract the valuename- The name by which to extract the value from the result setoptions- The options- Returns:
- The extracted value
- Throws:
java.sql.SQLException- Indicates a JDBC error occurred.
-
doExtract
protected abstract J doExtract(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options) throws java.sql.SQLException
Perform the extraction. Called fromextract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Parameters:
rs- The result setname- The value name in the result setoptions- The binding options- Returns:
- The extracted value.
- Throws:
java.sql.SQLException- Indicates a problem access the result set
-
extract
public J extract(java.sql.CallableStatement statement, int index, WrapperOptions options) throws java.sql.SQLException
- Specified by:
extractin interfaceValueExtractor<J>- Throws:
java.sql.SQLException
-
doExtract
protected abstract J doExtract(java.sql.CallableStatement statement, int index, WrapperOptions options) throws java.sql.SQLException
Perform the extraction. Called fromextract(java.sql.ResultSet, java.lang.String, 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 parameterindex- The index (position) of the output parameteroptions- The binding options- Returns:
- The extracted value.
- Throws:
java.sql.SQLException- Indicates a problem accessing the parameter value
-
extract
public J extract(java.sql.CallableStatement statement, java.lang.String[] paramNames, WrapperOptions options) throws java.sql.SQLException
- Specified by:
extractin interfaceValueExtractor<J>- Throws:
java.sql.SQLException
-
doExtract
protected abstract J doExtract(java.sql.CallableStatement statement, java.lang.String name, WrapperOptions options) throws java.sql.SQLException
Perform the extraction. Called fromextract(java.sql.ResultSet, java.lang.String, 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:
java.sql.SQLException- Indicates a problem accessing the parameter value
-
-