Class SpatialDatabasesSQLBuilder
java.lang.Object
com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesSQLBuilder
- Direct Known Subclasses:
H2SQLBuilder, MariadbSQLBuilder, OracleSQLBuilder, PostgisSQLBuilder, SpatialiteSQLBuilder
Creates SQL query strings for a Spatial database.
To be overloaded by classes implementing a spatial database support.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]protected SpatialDatabasesDSMetadataprotected SpatialReferenceSystemID -
Constructor Summary
ConstructorsConstructorDescriptionSpatialDatabasesSQLBuilder(SpatialDatabasesDSMetadata dbMetadata, SpatialReferenceSystemID defaultSRID, String[] colNames) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildBoxFilter(FilterQuery query) getCheckSQL(DataStoreLayer dsLayer) Builds a check SQL query for the given DataStoreLayer.protected StringgetColumnListSpecifier(String[] colNames, String geomColName) Returns the string representing a SQL column definition.protected SpatialDatabasesDSMetadatagetSQL(FilterQuery query) Builds a valid SQL spatial query with the given spatial filter.protected StringgetSRID(SpatialReferenceSystemID querySRID)
-
Field Details
-
defaultSRID
-
colNames
-
dbMetadata
-
-
Constructor Details
-
SpatialDatabasesSQLBuilder
public SpatialDatabasesSQLBuilder(SpatialDatabasesDSMetadata dbMetadata, SpatialReferenceSystemID defaultSRID, String[] colNames)
-
-
Method Details
-
getSQL
Builds a valid SQL spatial query with the given spatial filter.- Parameters:
query- the filter query- Returns:
- a SQL query to get column names
-
getCheckSQL
Builds a check SQL query for the given DataStoreLayer.- 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)- Parameters:
colNames- list of column namesgeomColName- name of the geometry column- Returns:
- column list
-
getDbMetadata
-
buildBoxFilter
-
getSRID
-