Class SpatialiteSQLBuilder

java.lang.Object
com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesSQLBuilder
com.vividsolutions.jump.datastore.spatialite.SpatialiteSQLBuilder

public class SpatialiteSQLBuilder extends SpatialDatabasesSQLBuilder
Creates SQL query strings for a Spatial database. To be overloaded by classes implementing a spatial database support.
  • Constructor Details

  • Method Details

    • getSQL

      public String getSQL(FilterQuery query)
      Builds a valid SQL spatial query with the given spatial filter.
      Overrides:
      getSQL in class SpatialDatabasesSQLBuilder
      Parameters:
      query - a spatial FilterQuery
      Returns:
      a SQL query to get column names
    • getCheckSQL

      public String getCheckSQL(DataStoreLayer dsLayer)
      Returns the query allowing to test a DataStoreLayer: builds a query with where clause and limit 0 to check where clause.
      Overrides:
      getCheckSQL in class SpatialDatabasesSQLBuilder
      Parameters:
      dsLayer - the @link DataStoreLayer to test
      Returns:
      a SQL query forced to limit 0 to test the layer source
    • getColumnListSpecifier

      protected String getColumnListSpecifier(String[] colNames, String geomColName)
      Returns the string representing a SQL column definition. Implementors should take care of column names (case, quotes)
      Overrides:
      getColumnListSpecifier in class SpatialDatabasesSQLBuilder
      Parameters:
      colNames - array of column names
      geomColName - name of the geometry column
      Returns:
      column list formatted for SQL
    • buildBoxFilter

      protected String buildBoxFilter(FilterQuery query)
      Overrides:
      buildBoxFilter in class SpatialDatabasesSQLBuilder
    • buildSpatialIndexFilter

      protected String buildSpatialIndexFilter(FilterQuery query)
      Builds a SQL filter to use spatial index, if concerned geometry column supports it.
      Parameters:
      query - the query to build the filter for
      Returns:
      the spatial index filter query, or an empty string if geometry column is not spatially indexed