Class PostgisFilterToSQL

    • Constructor Detail

      • PostgisFilterToSQL

        public PostgisFilterToSQL​(PostGISDialect dialect)
    • Method Detail

      • isLooseBBOXEnabled

        public boolean isLooseBBOXEnabled()
      • setLooseBBOXEnabled

        public void setLooseBBOXEnabled​(boolean looseBBOXEnabled)
      • isEncodeBBOXFilterAsEnvelope

        public boolean isEncodeBBOXFilterAsEnvelope​(boolean encodeBBOXFilterAsEnvelope)
      • setEncodeBBOXFilterAsEnvelope

        public void setEncodeBBOXFilterAsEnvelope​(boolean encodeBBOXFilterAsEnvelope)
      • visitLiteralGeometry

        protected void visitLiteralGeometry​(Literal expression)
                                     throws IOException
        Description copied from class: FilterToSQL
        Subclasses must implement this method in order to encode geometry filters according to the specific database implementation
        Overrides:
        visitLiteralGeometry in class FilterToSQL
        Throws:
        IOException
      • visit

        public Object visit​(Function function,
                            Object extraData)
                     throws RuntimeException
        Description copied from class: FilterToSQL
        Writes sql for a function expression. By default it will write the call by using the same arguments provided to the GeoTools function, subclasses should override on a case by case basis if this behavior is not the desired one.
        Specified by:
        visit in interface ExpressionVisitor
        Overrides:
        visit in class FilterToSQL
        Parameters:
        function - a function expression
        Throws:
        RuntimeException - If an IO error occurs.
        See Also:
        FilterToSQL.getFunctionName(Function)
      • visit

        public Object visit​(Literal literal,
                            Object extraData)
        Description copied from class: FilterToSQL
        Export the contents of a Literal Expresion
        Specified by:
        visit in interface ExpressionVisitor
        Overrides:
        visit in class FilterToSQL
        Parameters:
        literal - the Literal to export
      • cast

        protected String cast​(String encodedProperty,
                              Class target)
                       throws IOException
        Description copied from class: FilterToSQL
        Gives the opportunity to subclasses to force the property to the desired type. By default it simply writes out the property as-is (the property must be already escaped).
        Overrides:
        cast in class FilterToSQL
        Throws:
        IOException
      • setFunctionEncodingEnabled

        public void setFunctionEncodingEnabled​(boolean functionEncodingEnabled)
      • getDistanceInNativeUnits

        public double getDistanceInNativeUnits​(DistanceBufferOperator operator)
        Description copied from class: FilterToSQL
        Rough evaluation of distance in the units of the current SRID, assuming that the SRID maps to a known EPSG code. Will use a rather imprecise transformation for distances over degrees, but better than nothing.
        Overrides:
        getDistanceInNativeUnits in class FilterToSQL
      • visitBinaryComparisonOperator

        protected void visitBinaryComparisonOperator​(BinaryComparisonOperator filter,
                                                     Object extraData)
                                              throws RuntimeException
        Overrides base behavior to handler arrays
        Overrides:
        visitBinaryComparisonOperator in class FilterToSQL
        Parameters:
        filter - the comparison to be turned into SQL.
        Throws:
        RuntimeException - for io exception with writer
      • visit

        public Object visit​(PropertyIsBetween filter,
                            Object extraData)
                     throws RuntimeException
        Writes the SQL for the PropertyIsBetween Filter.
        Specified by:
        visit in interface FilterVisitor
        Overrides:
        visit in class FilterToSQL
        Parameters:
        filter - the Filter to be visited.
        Throws:
        RuntimeException - for io exception with writer
      • visit

        public Object visit​(PropertyIsEqualTo filter,
                            Object extraData)
        Description copied from class: FilterToSQL
        Write the SQL for this kind of filter
        Specified by:
        visit in interface FilterVisitor
        Overrides:
        visit in class FilterToSQL
        Parameters:
        filter - the filter to visit
        extraData - extra data (unused by this method)