Class PostgisSupport
- java.lang.Object
-
- org.hibernate.spatial.dialect.postgis.PostgisSupport
-
- All Implemented Interfaces:
Serializable,SpatialDialect
public class PostgisSupport extends Object implements SpatialDialect, Serializable
Created by Karel Maesen, Geovise BVBA on 29/10/16.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PostgisSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.hibernate.spatial.dialect.postgis.PostgisFunctionsfunctionsToRegister()StringgetDWithinSQL(String columnName)Returns The SQL fragment when parsing aDWithinExpression.StringgetHavingSridSQL(String columnName)Returns the SQL fragment when parsing aHavingSridExpression.StringgetIsEmptySQL(String columnName, boolean isEmpty)Returns the SQL fragment when parsing aIsEmptyExpressionorIsNotEmptyexpression.StringgetSpatialAggregateSQL(String columnName, int aggregation)Returns the SQL fragment for the specfied Spatial aggregate expression.StringgetSpatialFilterExpression(String columnName)Returns the SQL fragment for the SQL WHERE-expression when parsingorg.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.StringgetSpatialRelateSQL(String columnName, int spatialRelation)Returns the SQL fragment for the SQL WHERE-clause when parsingorg.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.booleansupports(SpatialFunction function)Does this dialect supports the specifiedSpatialFunction.booleansupportsFiltering()Returns true if thisSpatialDialectsupports a specific filtering function.
-
-
-
Method Detail
-
functionsToRegister
public org.hibernate.spatial.dialect.postgis.PostgisFunctions functionsToRegister()
-
getSpatialRelateSQL
public String getSpatialRelateSQL(String columnName, int spatialRelation)
Returns the SQL fragment for the SQL WHERE-clause when parsingorg.hibernatespatial.criterion.SpatialRelateExpressions into prepared statements.- Specified by:
getSpatialRelateSQLin interfaceSpatialDialect- Parameters:
columnName- The name of the geometry-typed column to which the relation is appliedspatialRelation- The type of spatial relation (as defined inSpatialRelation).- Returns:
- SQL fragment
SpatialRelateExpression
-
getSpatialFilterExpression
public String getSpatialFilterExpression(String columnName)
Returns the SQL fragment for the SQL WHERE-expression when parsingorg.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.- Specified by:
getSpatialFilterExpressionin interfaceSpatialDialect- Parameters:
columnName- The name of the geometry-typed column to which the filter is be applied- Returns:
- Rhe SQL fragment for the
SpatialFilterExpression
-
getSpatialAggregateSQL
public String getSpatialAggregateSQL(String columnName, int aggregation)
Returns the SQL fragment for the specfied Spatial aggregate expression.- Specified by:
getSpatialAggregateSQLin interfaceSpatialDialect- Parameters:
columnName- The name of the Geometry propertyaggregation- The type ofSpatialAggregate- Returns:
- The SQL fragment for the projection
-
getDWithinSQL
public String getDWithinSQL(String columnName)
Returns The SQL fragment when parsing aDWithinExpression.- Specified by:
getDWithinSQLin interfaceSpatialDialect- Parameters:
columnName- The geometry column to test against- Returns:
- The SQL fragment when parsing a
DWithinExpression.
-
getHavingSridSQL
public String getHavingSridSQL(String columnName)
Returns the SQL fragment when parsing aHavingSridExpression.- Specified by:
getHavingSridSQLin interfaceSpatialDialect- Parameters:
columnName- The geometry column to test against- Returns:
- The SQL fragment for a
HavingSridExpression.
-
getIsEmptySQL
public String getIsEmptySQL(String columnName, boolean isEmpty)
Returns the SQL fragment when parsing aIsEmptyExpressionorIsNotEmptyexpression.- Specified by:
getIsEmptySQLin interfaceSpatialDialect- Parameters:
columnName- The geometry columnisEmpty- Whether the geometry is tested for empty or non-empty- Returns:
- The SQL fragment for the isempty function
-
supportsFiltering
public boolean supportsFiltering()
Returns true if thisSpatialDialectsupports a specific filtering function.This is intended to signal DB-support for fast window queries, or MBR-overlap queries.
- Specified by:
supportsFilteringin interfaceSpatialDialect- Returns:
- True if filtering is supported
-
supports
public boolean supports(SpatialFunction function)
Does this dialect supports the specifiedSpatialFunction.- Specified by:
supportsin interfaceSpatialDialect- Parameters:
function-SpatialFunction- Returns:
- True if this
SpatialDialectsupports the spatial function specified by the function parameter.
-
-