![JAR search and dependency download from the Maven repository](/logo.png)
org.codegas.commons.jpa.converter.GeoPointStringConverter Maven / Gradle / Ivy
package org.codegas.commons.jpa.converter;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
import org.codegas.commons.lang.spacial.GeoPoint;
@Converter
public class GeoPointStringConverter implements AttributeConverter {
@Override
public String convertToDatabaseColumn(GeoPoint attributeObject) {
return attributeObject == null ? null : attributeObject.toString();
}
@Override
public GeoPoint convertToEntityAttribute(String dbData) {
return GeoPoint.fromString(dbData);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy