org.hibernatespatial
Interface SpatialDialect

All Superinterfaces:
Serializable

public interface SpatialDialect
extends Serializable

Describes the features of a spatially enabled dialect.

Author:
Karel Maesen

Method Summary
 String getDbGeometryTypeName()
          Returns the name of the native database type for storing geometries.
 String getDWithinSQL(String columnName)
          Returns the SQL fragment when parsing a DWithinExpression.
 org.hibernate.usertype.UserType getGeometryUserType()
           
 String getHavingSridSQL(String columnName)
          Returns the SQL fragment when parsing an HavingSridExpression.
 String getIsEmptySQL(String columnName, boolean isEmpty)
          Returns the SQL fragment when parsing a IsEmptyExpression or IsNotEmpty expression.
 String getSpatialAggregateSQL(String columnName, int aggregation)
           
 String getSpatialFilterExpression(String columnName)
          Returns the SQL fragment for the SQL WHERE-expression when parsing org.hibernatespatial.criterion.SpatialFilterExpressions into prepared statements.
 String getSpatialRelateSQL(String columnName, int spatialRelation)
          Returns the SQL fragment for the SQL WHERE-clause when parsing org.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.
 boolean isTwoPhaseFiltering()
          Deprecated. 
 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

String getSpatialRelateSQL(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

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

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

getGeometryUserType

org.hibernate.usertype.UserType getGeometryUserType()
Returns:
an instance of the Geometry Usertype that this dialect provides

getSpatialAggregateSQL

String getSpatialAggregateSQL(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

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

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

getHavingSridSQL

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

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

getIsEmptySQL

String getIsEmptySQL(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:

getDbGeometryTypeName

String getDbGeometryTypeName()
Returns the name of the native database type for storing geometries.

Returns:
type name

isTwoPhaseFiltering

@Deprecated
boolean isTwoPhaseFiltering()
Deprecated. 

Does this dialect support explicit two-phase filtering when filtering on spatial relations?

In two-phase filtering you can form a SQL WHERE-expression that searches for matching objects in two phases. A first phase performs a quick bounding box search for neighbouring objects. The second phase calculates the precise spatial relation between the testsuite-suite object and the results of the first phase.


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.


Copyright © 2011 hibernatespatial.org. All Rights Reserved.