Class GeometryJdbcConverter

java.lang.Object
nl.b3p.jdbc.util.converter.GeometryJdbcConverter
Direct Known Subclasses:
HSQLJdbcConverter, MssqlJdbcConverter, OracleJdbcConverter, PostgisJdbcConverter

public abstract class GeometryJdbcConverter extends Object
Author:
Matthijs Laan, Meine Toonen, mprins
  • 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

      public abstract org.locationtech.jts.geom.Geometry convertToJTSGeometryObject(Object nativeObj)
    • createPSGeometryPlaceholder

      public String createPSGeometryPlaceholder() throws SQLException
      Throws:
      SQLException
    • getSchema

      public abstract String getSchema()
    • getGeomTypeName

      public abstract String getGeomTypeName()
    • isDuplicateKeyViolationMessage

      public abstract boolean isDuplicateKeyViolationMessage(String message)
    • isFKConstraintViolationMessage

      public abstract boolean isFKConstraintViolationMessage(String message)
      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

      public abstract String buildPaginationSql(String sql, int offset, int limit)
    • buildLimitSql

      public abstract StringBuilder buildLimitSql(StringBuilder sql, int limit)
    • useSavepoints

      public abstract boolean useSavepoints()
    • isPmdKnownBroken

      public abstract boolean isPmdKnownBroken()
    • getMViewsSQL

      public abstract String getMViewsSQL()
    • getMViewRefreshSQL

      public abstract String getMViewRefreshSQL(String mview)
    • getUpdateSequenceSQL

      public String getUpdateSequenceSQL(String seqName, long nextVal)
      Gets a statement to use in a PreparedStatement to restart a sequence.
      Parameters:
      seqName - name of sequence
      nextVal - 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

      public abstract String getSelectNextValueFromSequenceSQL(String seqName)
      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

      public abstract String 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