Class AbstractFilterFunction

    • Field Detail

      • MAX_FILTER_DEPTH

        private static final int MAX_FILTER_DEPTH
        Maximum filter depth.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractFilterFunction

        public AbstractFilterFunction()
    • Method Detail

      • readNextComponent

        private Filter readNextComponent​(String filter,
                                         int depth)
                                  throws FilterParseException
        Reads the next component contained in the supplied filter.
        Parameters:
        filter - to parse
        depth - counter to track invocation depth
        Returns:
        search filter
        Throws:
        FilterParseException - if filter does not start with '(' and end with ')'
      • readFilterSet

        private FilterSet readFilterSet​(FilterSet set,
                                        String filter,
                                        int start,
                                        int end,
                                        int depth)
                                 throws FilterParseException
        Reads the supplied filter using the supplied indices and adds them to the supplied filter set.
        Parameters:
        set - to update
        filter - to parse
        start - position in filter
        end - position in filter
        depth - counter to track invocation depth
        Returns:
        the supplied filter set with components added from filter
        Throws:
        FilterParseException - if filter doesn't start with '(' and containing a matching ')'
      • findMatchingParenPosition

        private int findMatchingParenPosition​(String filter,
                                              int start)
                                       throws FilterParseException
        Returns the index in the supplied filter of the closing paren that matches the opening paren at the start of the filter.
        Parameters:
        filter - to search
        start - position of the opening paren
        Returns:
        index of the matching paren
        Throws:
        FilterParseException - if filter is null, empty or does not begin with '('
      • parseFilterComp

        protected abstract Filter parseFilterComp​(String filter)
                                           throws FilterParseException
        Inspects the supplied filter string and creates the type of filter it represents.
        Parameters:
        filter - to inspect
        Returns:
        search filter
        Throws:
        FilterParseException - if filter is invalid