Class PostgisPG9Dialect

    • Constructor Detail

      • PostgisPG9Dialect

        public PostgisPG9Dialect()
        Creates an instance
    • Method Detail

      • contributeTypes

        public void contributeTypes​(TypeContributions typeContributions,
                                    ServiceRegistry serviceRegistry)
        Description copied from class: Dialect
        Allows the Dialect to contribute additional types
        Overrides:
        contributeTypes in class PostgreSQL82Dialect
        Parameters:
        typeContributions - Callback to contribute the types
        serviceRegistry - The service registry
      • equivalentTypes

        public boolean equivalentTypes​(int typeCode1,
                                       int typeCode2)
        Description copied from class: Dialect
        Do the given JDBC type codes, as defined in Types represent essentially the same type in this dialect of SQL? The default implementation treats NUMERIC and DECIMAL as the same type, and FLOAT, REAL, and DOUBLE as essentially the same type, since the ANSI SQL specification fails to meaningfully distinguish them.
        Overrides:
        equivalentTypes in class Dialect
        Parameters:
        typeCode1 - the first JDBC type code
        typeCode2 - the second JDBC type code
        Returns:
        true if the two type codes are equivalent
      • getSpatialRelateSQL

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

        Specified by:
        getSpatialRelateSQL in interface SpatialDialect
        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 SpatialRelateExpression
      • getSpatialFilterExpression

        public String getSpatialFilterExpression​(String columnName)
        Returns the SQL fragment for the SQL WHERE-expression when parsing org.hibernate.spatial.criterion.SpatialFilterExpressions into prepared statements.
        Specified by:
        getSpatialFilterExpression in interface SpatialDialect
        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:
        getSpatialAggregateSQL in interface SpatialDialect
        Parameters:
        columnName - The name of the Geometry property
        aggregation - The type of SpatialAggregate
        Returns:
        The SQL fragment for the projection
      • getDWithinSQL

        public String getDWithinSQL​(String columnName)
        Returns The SQL fragment when parsing a DWithinExpression.
        Specified by:
        getDWithinSQL in interface SpatialDialect
        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 a HavingSridExpression.
        Specified by:
        getHavingSridSQL in interface SpatialDialect
        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 a IsEmptyExpression or IsNotEmpty expression.
        Specified by:
        getIsEmptySQL in interface SpatialDialect
        Parameters:
        columnName - The geometry column
        isEmpty - 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 this SpatialDialect supports a specific filtering function.

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

        Specified by:
        supportsFiltering in interface SpatialDialect
        Returns:
        True if filtering is supported
      • supports

        public boolean supports​(SpatialFunction function)
        Does this dialect supports the specified SpatialFunction.
        Specified by:
        supports in interface SpatialDialect
        Parameters:
        function - SpatialFunction
        Returns:
        True if this SpatialDialect supports the spatial function specified by the function parameter.