Class GeometryWktConverter
java.lang.Object
io.micronaut.data.model.runtime.convert.GeometryWktConverter
- All Implemented Interfaces:
AttributeConverter<Geometry,String>
@Singleton
public final class GeometryWktConverter
extends Object
implements AttributeConverter<Geometry,String>
Converts
Geometry values to and from their Well-Known Text (WKT) representation.
This converter supports the Micronaut Data geo model hierarchy and handles nested
structures such as GeometryCollection values during formatting and parsing.
- Since:
- 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable GeometryconvertToEntityValue(@Nullable String persistedValue, io.micronaut.core.convert.ConversionContext context) Converts the persisted value to the entity value.@Nullable StringconvertToPersistedValue(@Nullable Geometry entityValue, io.micronaut.core.convert.ConversionContext context) Converts the entity value to the persisted value.
-
Constructor Details
-
GeometryWktConverter
public GeometryWktConverter()
-
-
Method Details
-
convertToPersistedValue
public @Nullable String convertToPersistedValue(@Nullable Geometry entityValue, io.micronaut.core.convert.ConversionContext context) Description copied from interface:AttributeConverterConverts the entity value to the persisted value.- Specified by:
convertToPersistedValuein interfaceAttributeConverter<Geometry,String> - Parameters:
entityValue- The entity valuecontext- The conversion context.- Returns:
- the persisted value
-
convertToEntityValue
public @Nullable Geometry convertToEntityValue(@Nullable String persistedValue, io.micronaut.core.convert.ConversionContext context) Description copied from interface:AttributeConverterConverts the persisted value to the entity value.- Specified by:
convertToEntityValuein interfaceAttributeConverter<Geometry,String> - Parameters:
persistedValue- The persisted valuecontext- The conversion context.- Returns:
- the entity value
-