Class PreparedFilterToSQL

    • Field Detail

      • literalValues

        protected List<Object> literalValues
        ordered list of literal values encountered and their types
      • literalTypes

        protected List<Class> literalTypes
      • SRIDs

        protected List<Integer> SRIDs
      • dimensions

        protected List<Integer> dimensions
    • Constructor Detail

      • PreparedFilterToSQL

        public PreparedFilterToSQL​(PreparedStatementSQLDialect dialect)
        Contructor taking a reference to the SQL dialect, will use it to encode geometry placeholders
      • PreparedFilterToSQL

        public PreparedFilterToSQL​(Writer out)
    • Method Detail

      • isPrepareEnabled

        public boolean isPrepareEnabled()
        If true (default) a sql statement with literal placemarks is created, otherwise a normal statement is created
      • setPrepareEnabled

        public void setPrepareEnabled​(boolean prepareEnabled)
      • visit

        public Object visit​(Literal expression,
                            Object context)
                     throws RuntimeException
        Description copied from class: FilterToSQL
        Export the contents of a Literal Expresion
        Specified by:
        visit in interface ExpressionVisitor
        visit in class FilterToSQL
        expression - the Literal to export
        RuntimeException - for io exception with writer
      • convertEnvelopeToPolygon

        protected boolean convertEnvelopeToPolygon()
        When returning true, the Literal visit will turn Envelope objects (typically coming from BBOX filters) into Polygon. Defaults to true, subclasses can override.
      • visit

        public Object visit​(Id filter,
                            Object extraData)
        Encodes an Id filter
        Specified by:
        visit in interface FilterVisitor
        visit in class FilterToSQL
        filter - the
        RuntimeException - If there's a problem writing output
      • getLiteralValues

        public List<Object> getLiteralValues()
      • getLiteralTypes

        public List<Class> getLiteralTypes()
      • getSRIDs

        public List<Integer> getSRIDs()
        Returns the list of native SRID for each literal that happens to be a geometry, or null otherwise
      • getDimensions

        public List<Integer> getDimensions()
        Returns the list of dimensions for each literal tha happens to be a geometry, or null otherwise
      • getDescriptors

        public List<AttributeDescriptor> getDescriptors()
        Returns the attribute descriptors compared to a given literal (if any, not always available, normally only needed if arrays are involved)