Class H2SQLBuilder
java.lang.Object
com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesSQLBuilder
com.vividsolutions.jump.datastore.h2.H2SQLBuilder
Query builder for H2GIS queries.
-
Field Summary
Fields inherited from class SpatialDatabasesSQLBuilder
colNames, dbMetadata, defaultSRID -
Constructor Summary
ConstructorsConstructorDescriptionH2SQLBuilder(SpatialDatabasesDSMetadata dbMetadata, SpatialReferenceSystemID defaultSRID, String[] colNames) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildBoxFilter(FilterQuery query) getCheckSQL(DataStoreLayer dsLayer) Returns the query allowing to test a DataStoreLayer: builds a query with where clause and limit 0 to check where clause.protected StringgetColumnListSpecifier(String[] colNames, String geomColName) Returns the string representing a SQL column definition.getSQL(FilterQuery query) Builds a valid SQL spatial query with the given spatial filter.Methods inherited from class SpatialDatabasesSQLBuilder
getDbMetadata, getSRID
-
Constructor Details
-
H2SQLBuilder
public H2SQLBuilder(SpatialDatabasesDSMetadata dbMetadata, SpatialReferenceSystemID defaultSRID, String[] colNames)
-
-
Method Details
-
getSQL
Builds a valid SQL spatial query with the given spatial filter.- Overrides:
getSQLin classSpatialDatabasesSQLBuilder- Parameters:
query- a FilterQuery- Returns:
- a SQL query to get column names //TODO: refactor like Oracle code: queries as variable placeholders: put it in base class.
-
getCheckSQL
Returns the query allowing to test a DataStoreLayer: builds a query with where clause and limit 0 to check where clause.- Overrides:
getCheckSQLin classSpatialDatabasesSQLBuilder- Parameters:
dsLayer- the @link DataStoreLayer to test- Returns:
- a SQL query forced to limit 0 to test the layer source
-
getColumnListSpecifier
Returns the string representing a SQL column definition. Implementors should take care of column names (case, quotes)- Overrides:
getColumnListSpecifierin classSpatialDatabasesSQLBuilder- Parameters:
colNames- list of columns to getgeomColName- name of the geometry column- Returns:
- column list as a String
-
buildBoxFilter
- Overrides:
buildBoxFilterin classSpatialDatabasesSQLBuilder
-