Package org.hibernate.spatial
Class GeolatteGeometryJavaType
- java.lang.Object
-
- org.hibernate.type.descriptor.java.AbstractJavaType<org.geolatte.geom.Geometry>
-
- org.hibernate.spatial.GeolatteGeometryJavaType
-
- All Implemented Interfaces:
Serializable
,BasicJavaType<org.geolatte.geom.Geometry>
,JavaType<org.geolatte.geom.Geometry>
public class GeolatteGeometryJavaType extends AbstractJavaType<org.geolatte.geom.Geometry>
Descriptor for geolatte-geomGeometry
s.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.hibernate.type.descriptor.java.JavaType
JavaType.CoercionContext
-
-
Field Summary
Fields Modifier and Type Field Description static GeolatteGeometryJavaType
GEOMETRY_INSTANCE
an instance of this descriptorstatic GeolatteGeometryJavaType
GEOMETRYCOLL_INSTANCE
static GeolatteGeometryJavaType
LINESTRING_INSTANCE
static GeolatteGeometryJavaType
MULTILINESTRING_INSTANCE
static GeolatteGeometryJavaType
MULTIPOINT_INSTANCE
static GeolatteGeometryJavaType
MULTIPOLYGON_INSTANCE
static GeolatteGeometryJavaType
POINT_INSTANCE
static GeolatteGeometryJavaType
POLYGON_INSTANCE
-
Constructor Summary
Constructors Constructor Description GeolatteGeometryJavaType(Class<? extends org.geolatte.geom.Geometry> type)
Initialize a type descriptor for the geolatte-geomGeometry
type.GeolatteGeometryJavaType(Class<? extends org.geolatte.geom.Geometry> type, org.geolatte.geom.codec.Wkt.Dialect wktDialect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.geolatte.geom.Geometry
fromString(CharSequence string)
JdbcType
getRecommendedJdbcType(JdbcTypeIndicators indicators)
Obtain the "recommended" SQL type descriptor for this Java type.String
toString(org.geolatte.geom.Geometry value)
<X> X
unwrap(org.geolatte.geom.Geometry value, Class<X> type, WrapperOptions options)
Unwrap an instance of our handled Java type into the requested type.<X> org.geolatte.geom.Geometry
wrap(X value, WrapperOptions options)
Wrap a value as our handled Java type.-
Methods inherited from class org.hibernate.type.descriptor.java.AbstractJavaType
areEqual, extractHashCode, extractLoggableRepresentation, getComparator, getJavaType, getMutabilityPlan, unknownUnwrap, unknownWrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.type.descriptor.java.JavaType
coerce, createJavaType, createJavaType, getCheckCondition, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale, getDefaultValue, getJavaTypeClass, getLongSqlLength, getReplacement, isInstance, isWider
-
-
-
-
Field Detail
-
GEOMETRY_INSTANCE
public static final GeolatteGeometryJavaType GEOMETRY_INSTANCE
an instance of this descriptor
-
POINT_INSTANCE
public static final GeolatteGeometryJavaType POINT_INSTANCE
-
LINESTRING_INSTANCE
public static final GeolatteGeometryJavaType LINESTRING_INSTANCE
-
POLYGON_INSTANCE
public static final GeolatteGeometryJavaType POLYGON_INSTANCE
-
GEOMETRYCOLL_INSTANCE
public static final GeolatteGeometryJavaType GEOMETRYCOLL_INSTANCE
-
MULTIPOINT_INSTANCE
public static final GeolatteGeometryJavaType MULTIPOINT_INSTANCE
-
MULTILINESTRING_INSTANCE
public static final GeolatteGeometryJavaType MULTILINESTRING_INSTANCE
-
MULTIPOLYGON_INSTANCE
public static final GeolatteGeometryJavaType MULTIPOLYGON_INSTANCE
-
-
Constructor Detail
-
GeolatteGeometryJavaType
public GeolatteGeometryJavaType(Class<? extends org.geolatte.geom.Geometry> type)
Initialize a type descriptor for the geolatte-geomGeometry
type.
-
GeolatteGeometryJavaType
public GeolatteGeometryJavaType(Class<? extends org.geolatte.geom.Geometry> type, org.geolatte.geom.codec.Wkt.Dialect wktDialect)
-
-
Method Detail
-
toString
public String toString(org.geolatte.geom.Geometry value)
-
fromString
public org.geolatte.geom.Geometry fromString(CharSequence string)
-
getRecommendedJdbcType
public JdbcType getRecommendedJdbcType(JdbcTypeIndicators indicators)
Description copied from interface:BasicJavaType
Obtain the "recommended" SQL type descriptor for this Java type. The recommended aspect comes from the JDBC spec (mostly).- Parameters:
indicators
- Contextual information- Returns:
- The recommended SQL type descriptor
-
unwrap
public <X> X unwrap(org.geolatte.geom.Geometry value, Class<X> type, WrapperOptions options)
Description copied from interface:JavaType
Unwrap an instance of our handled Java type into the requested type. As an example, if this is aJavaType<Integer>
and we are asked to unwrap theInteger value
as aLong
we would return something likeLong.valueOf( value.longValue() )
. Intended use is duringPreparedStatement
binding.- Type Parameters:
X
- The conversion type.- Parameters:
value
- The value to unwraptype
- The type as which to unwrapoptions
- The options- Returns:
- The unwrapped value.
-
wrap
public <X> org.geolatte.geom.Geometry wrap(X value, WrapperOptions options)
Description copied from interface:JavaType
Wrap a value as our handled Java type. Intended use is duringResultSet
extraction.- Type Parameters:
X
- The conversion type.- Parameters:
value
- The value to wrap.options
- The options- Returns:
- The wrapped value.
-
-