Class SDOGeometryValueExtractor<X>
- java.lang.Object
-
- org.hibernate.type.descriptor.sql.BasicExtractor<X>
-
- org.hibernate.spatial.dialect.oracle.SDOGeometryValueExtractor<X>
-
- All Implemented Interfaces:
ValueExtractor<X>
public class SDOGeometryValueExtractor<X> extends BasicExtractor<X>
ValueExtractor for SDO_GEOMETRY
-
-
Constructor Summary
Constructors Constructor Description SDOGeometryValueExtractor(JavaTypeDescriptor<X> javaDescriptor, SqlTypeDescriptor sqlTypeDescriptor)Creates instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.geolatte.geom.Geometryconvert(java.lang.Object struct)Converts an oracle to a JTS Geometryprotected XdoExtract(java.sql.CallableStatement statement, int index, WrapperOptions options)Perform the extraction.protected XdoExtract(java.sql.CallableStatement statement, java.lang.String name, WrapperOptions options)Perform the extraction.protected XdoExtract(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options)Perform the extraction.-
Methods inherited from class org.hibernate.type.descriptor.sql.BasicExtractor
extract, extract, extract, getJavaDescriptor, getSqlDescriptor
-
-
-
-
Constructor Detail
-
SDOGeometryValueExtractor
public SDOGeometryValueExtractor(JavaTypeDescriptor<X> javaDescriptor, SqlTypeDescriptor sqlTypeDescriptor)
Creates instance- Parameters:
javaDescriptor- theJavaTypeDescriptorto usesqlTypeDescriptor- theSqlTypeDescriptorto use
-
-
Method Detail
-
doExtract
protected X doExtract(java.sql.ResultSet rs, java.lang.String name, WrapperOptions options) throws java.sql.SQLException
Description copied from class:BasicExtractorPerform the extraction. Called fromBasicExtractor.extract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Specified by:
doExtractin classBasicExtractor<X>- 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
-
doExtract
protected X doExtract(java.sql.CallableStatement statement, int index, WrapperOptions options) throws java.sql.SQLException
Description copied from class:BasicExtractorPerform the extraction. Called fromBasicExtractor.extract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Specified by:
doExtractin classBasicExtractor<X>- 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
-
doExtract
protected X doExtract(java.sql.CallableStatement statement, java.lang.String name, WrapperOptions options) throws java.sql.SQLException
Description copied from class:BasicExtractorPerform the extraction. Called fromBasicExtractor.extract(java.sql.ResultSet, java.lang.String, org.hibernate.type.descriptor.WrapperOptions). Null checking of the value (as well as consultingResultSet.wasNull()) is done there.- Specified by:
doExtractin classBasicExtractor<X>- 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
-
convert
public org.geolatte.geom.Geometry convert(java.lang.Object struct)
Converts an oracle to a JTS Geometry- Parameters:
struct- The Oracle STRUCT representation of an SDO_GEOMETRY- Returns:
- The JTS Geometry value
-
-