Package nl.b3p.jdbc.util.converter
Class GeometryJdbcConverter
java.lang.Object
nl.b3p.jdbc.util.converter.GeometryJdbcConverter
- Direct Known Subclasses:
HSQLJdbcConverter,MssqlJdbcConverter,OracleJdbcConverter,PostgisJdbcConverter
- Author:
- Matthijs Laan, Meine Toonen, mprins
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringBuilderbuildLimitSql(StringBuilder sql, int limit) abstract StringbuildPaginationSql(String sql, int offset, int limit) abstract org.locationtech.jts.geom.GeometryconvertToJTSGeometryObject(Object nativeObj) abstract ObjectconvertToNativeGeometryObject(org.locationtech.jts.geom.Geometry param) abstract ObjectconvertToNativeGeometryObject(org.locationtech.jts.geom.Geometry param, int srid) static ObjectconvertToSQLObject(String stringValue, ColumnMetadata cm, String tableName, String column) createNativePoint(double lat, double lon, int srid) abstract Stringabstract Stringabstract StringgetMViewRefreshSQL(String mview) abstract Stringabstract Stringabstract StringgetSelectNextValueFromSequenceSQL(String seqName) get the database flavour specific SQL statement to get the next value from a sequence.getUpdateSequenceSQL(String seqName, long nextVal) Gets a statement to use in aPreparedStatementto restart a sequence.abstract booleanisDuplicateKeyViolationMessage(String message) abstract booleanisFKConstraintViolationMessage(String message) bepaal of een melding een constraint violation betreft.abstract booleanabstract boolean
-
Field Details
-
wkt
protected final org.locationtech.jts.io.WKTReader wkt -
gf
protected org.locationtech.jts.geom.GeometryFactory gf
-
-
Constructor Details
-
GeometryJdbcConverter
public GeometryJdbcConverter()
-
-
Method Details
-
convertToSQLObject
public static Object convertToSQLObject(String stringValue, ColumnMetadata cm, String tableName, String column) -
convertToNativeGeometryObject
public abstract Object convertToNativeGeometryObject(org.locationtech.jts.geom.Geometry param) throws SQLException, org.locationtech.jts.io.ParseException - Throws:
SQLExceptionorg.locationtech.jts.io.ParseException
-
convertToNativeGeometryObject
public abstract Object convertToNativeGeometryObject(org.locationtech.jts.geom.Geometry param, int srid) throws SQLException, org.locationtech.jts.io.ParseException - Throws:
SQLExceptionorg.locationtech.jts.io.ParseException
-
convertToJTSGeometryObject
-
createPSGeometryPlaceholder
- Throws:
SQLException
-
getSchema
-
getGeomTypeName
-
isDuplicateKeyViolationMessage
-
isFKConstraintViolationMessage
bepaal of een melding een constraint violation betreft.- Parameters:
message- de melding uit de database- Returns:
trueals de melding een contraint violation betreft
-
buildPaginationSql
-
buildLimitSql
-
useSavepoints
public abstract boolean useSavepoints() -
isPmdKnownBroken
public abstract boolean isPmdKnownBroken() -
getMViewsSQL
-
getMViewRefreshSQL
-
getUpdateSequenceSQL
Gets a statement to use in aPreparedStatementto restart a sequence.- Parameters:
seqName- name of sequencenextVal- the value to restart the sequence, some systems require this to be larger than the next value of the sequence.- Returns:
- SQL statement specific for the flavour of database
-
getSelectNextValueFromSequenceSQL
get the database flavour specific SQL statement to get the next value from a sequence.- Parameters:
seqName- name of sequence- Returns:
- SQL statement specific for the flavour of database
-
getGeotoolsDBTypeName
-
convertToNativeGeometryObject
public Object convertToNativeGeometryObject(String param) throws org.locationtech.jts.io.ParseException, SQLException - Throws:
org.locationtech.jts.io.ParseExceptionSQLException
-
createNativePoint
public Object createNativePoint(double lat, double lon, int srid) throws SQLException, org.locationtech.jts.io.ParseException - Throws:
SQLExceptionorg.locationtech.jts.io.ParseException
-