org.hibernate.spatial
Interface SpatialDialect

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
GeoDBDialect, MySQLSpatial56Dialect, MySQLSpatial5InnoDBDialect, MySQLSpatialDialect, MySQLSpatialInnoDBDialect, OracleSpatial10gDialect, PostgisDialect, PostgisNoSQLMM, SqlServer2008SpatialDialect

public interface SpatialDialect
extends java.io.Serializable

Describes the features of a spatially enabled dialect.


Method Summary
 java.lang.String getDWithinSQL(java.lang.String columnName)
          Returns the SQL fragment when parsing a DWithinExpression.
 java.lang.String getHavingSridSQL(java.lang.String columnName)
          Returns the SQL fragment when parsing an HavingSridExpression.
 java.lang.String getIsEmptySQL(java.lang.String columnName, boolean isEmpty)
          Returns the SQL fragment when parsing a IsEmptyExpression or IsNotEmpty expression.
 java.lang.String getSpatialAggregateSQL(java.lang.String columnName, int aggregation)
           
 java.lang.String getSpatialFilterExpression(java.lang.String columnName)
          Returns the SQL fragment for the SQL WHERE-expression when parsing org.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.
 java.lang.String getSpatialRelateSQL(java.lang.String columnName, int spatialRelation)
          Returns the SQL fragment for the SQL WHERE-clause when parsing org.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.
 boolean supports(SpatialFunction function)
          Does this dialect supports the specified SpatialFunction.
 boolean supportsFiltering()
          Returns true if this SpatialDialect supports a specific filtering function.
 

Method Detail

getSpatialRelateSQL

java.lang.String getSpatialRelateSQL(java.lang.String columnName,
                                     int spatialRelation)
Returns the SQL fragment for the SQL WHERE-clause when parsing org.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.

Parameters:
columnName - The name of the geometry-typed column to which the relation is applied
spatialRelation - The type of spatial relation (as defined in SpatialRelation).
Returns:
SQL fragment for use in the SQL WHERE-clause.

getSpatialFilterExpression

java.lang.String getSpatialFilterExpression(java.lang.String columnName)
Returns the SQL fragment for the SQL WHERE-expression when parsing org.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.

Parameters:
columnName- - the name of the geometry-typed column to which the filter is be applied.
Returns:

getSpatialAggregateSQL

java.lang.String getSpatialAggregateSQL(java.lang.String columnName,
                                        int aggregation)
Parameters:
columnName - the name of the Geometry property
aggregation - the type of SpatialAggregate
Returns:
the SQL fragment for the projection

getDWithinSQL

java.lang.String getDWithinSQL(java.lang.String columnName)
Returns the SQL fragment when parsing a DWithinExpression.

Parameters:
columnName - the geometry column to test against
Returns:

getHavingSridSQL

java.lang.String getHavingSridSQL(java.lang.String columnName)
Returns the SQL fragment when parsing an HavingSridExpression.

Parameters:
columnName - the geometry column to test against
Returns:

getIsEmptySQL

java.lang.String getIsEmptySQL(java.lang.String columnName,
                               boolean isEmpty)
Returns the SQL fragment when parsing a IsEmptyExpression or IsNotEmpty expression.

Parameters:
columnName - the geometry column
isEmpty - whether the geometry is tested for empty or non-empty
Returns:

supportsFiltering

boolean supportsFiltering()
Returns true if this SpatialDialect supports a specific filtering function.

This is intended to signal DB-support for fast window queries, or MBR-overlap queries


supports

boolean supports(SpatialFunction function)
Does this dialect supports the specified SpatialFunction.

Parameters:
function - SpatialFunction
Returns:
true if this SpatialDialect supports the spatial function specified by the function parameter.