Class JTSGeometryJavaType
java.lang.Object
org.hibernate.type.descriptor.java.AbstractJavaType<org.locationtech.jts.geom.Geometry>
org.hibernate.spatial.JTSGeometryJavaType
- All Implemented Interfaces:
Serializable, BasicJavaType<org.locationtech.jts.geom.Geometry>, JavaType<org.locationtech.jts.geom.Geometry>
Descriptor for JTS
Geometrys.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface JavaType
JavaType.CoercionContext -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JTSGeometryJavaTypeAn instance of this descriptorstatic final JTSGeometryJavaTypestatic final JTSGeometryJavaTypestatic final JTSGeometryJavaTypestatic final JTSGeometryJavaTypestatic final JTSGeometryJavaTypestatic final JTSGeometryJavaTypestatic final JTSGeometryJavaType -
Constructor Summary
ConstructorsConstructorDescriptionJTSGeometryJavaType(Class<? extends org.locationtech.jts.geom.Geometry> type) Initialize a type descriptor for the geolatte-geomGeometrytype. -
Method Summary
Modifier and TypeMethodDescriptionbooleanareEqual(org.locationtech.jts.geom.Geometry one, org.locationtech.jts.geom.Geometry another) Determine if two instances are equalorg.locationtech.jts.geom.GeometryfromString(CharSequence string) getRecommendedJdbcType(JdbcTypeIndicators indicators) Obtain the "recommended" SQL type descriptor for this Java type.toString(org.locationtech.jts.geom.Geometry value) <X> Xunwrap(org.locationtech.jts.geom.Geometry value, Class<X> type, WrapperOptions options) Unwrap an instance of our handled Java type into the requested type.<X> org.locationtech.jts.geom.Geometrywrap(X value, WrapperOptions options) Wrap a value as our handled Java type.Methods inherited from class AbstractJavaType
extractHashCode, extractLoggableRepresentation, getComparator, getJavaType, getMutabilityPlan, unknownUnwrap, unknownWrapMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaType
appendEncodedString, cast, coerce, createJavaType, fromEncodedString, fromEncodedString, getCheckCondition, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlScale, getDefaultValue, getJavaTypeClass, getLongSqlLength, getReplacement, getTypeName, isInstance, isTemporalType, isWider, useObjectEqualsHashCode
-
Field Details
-
GEOMETRY_INSTANCE
An instance of this descriptor -
POINT_INSTANCE
-
LINESTRING_INSTANCE
-
POLYGON_INSTANCE
-
GEOMETRYCOLL_INSTANCE
-
MULTIPOINT_INSTANCE
-
MULTILINESTRING_INSTANCE
-
MULTIPOLYGON_INSTANCE
-
-
Constructor Details
-
JTSGeometryJavaType
Initialize a type descriptor for the geolatte-geomGeometrytype.
-
-
Method Details
-
toString
-
fromString
-
getRecommendedJdbcType
Description copied from interface:BasicJavaTypeObtain the "recommended" SQL type descriptor for this Java type. Often, but not always, the source of this recommendation is the JDBC specification.- Parameters:
indicators- Contextual information- Returns:
- The recommended SQL type descriptor
-
areEqual
public boolean areEqual(org.locationtech.jts.geom.Geometry one, org.locationtech.jts.geom.Geometry another) Description copied from interface:JavaTypeDetermine if two instances are equal- Specified by:
areEqualin interfaceJavaType<org.locationtech.jts.geom.Geometry>- Overrides:
areEqualin classAbstractJavaType<org.locationtech.jts.geom.Geometry>- Parameters:
one- One instanceanother- The other instance- Returns:
- True if the two are considered equal; false otherwise.
-
unwrap
public <X> X unwrap(org.locationtech.jts.geom.Geometry value, Class<X> type, WrapperOptions options) Description copied from interface:JavaTypeUnwrap an instance of our handled Java type into the requested type.As an example, if this is a
JavaType<Integer>and we are asked to unwrap theInteger valueas aLong, we would return something likeLong.valueOf( value.longValue() ).Intended use is during
PreparedStatementbinding.- 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
-