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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract StringBuilder
buildLimitSql
(StringBuilder sql, int limit) abstract String
buildPaginationSql
(String sql, int offset, int limit) abstract org.locationtech.jts.geom.Geometry
convertToJTSGeometryObject
(Object nativeObj) abstract Object
convertToNativeGeometryObject
(org.locationtech.jts.geom.Geometry param) abstract Object
convertToNativeGeometryObject
(org.locationtech.jts.geom.Geometry param, int srid) static Object
convertToSQLObject
(String stringValue, ColumnMetadata cm, String tableName, String column) createNativePoint
(double lat, double lon, int srid) abstract String
abstract String
abstract String
getMViewRefreshSQL
(String mview) abstract String
abstract String
abstract String
getSelectNextValueFromSequenceSQL
(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 aPreparedStatement
to restart a sequence.abstract boolean
isDuplicateKeyViolationMessage
(String message) abstract boolean
isFKConstraintViolationMessage
(String message) bepaal of een melding een constraint violation betreft.abstract boolean
abstract 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:
SQLException
org.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:
SQLException
org.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:
true
als 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 aPreparedStatement
to 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.ParseException
SQLException
-
createNativePoint
public Object createNativePoint(double lat, double lon, int srid) throws SQLException, org.locationtech.jts.io.ParseException - Throws:
SQLException
org.locationtech.jts.io.ParseException
-