Interface RSQLArgumentParser

  • All Known Implementing Classes:
    DefaultRSQLArgumentParser

    public interface RSQLArgumentParser

    Parses the list of arguments provided during RSQL parsing into a list of real typed objects. For example, the arguments may contain String representations of decimals, booleans, dates, etc... This parsers job is to convert those String representations into real BigDecimal, Boolean, and Date objects.

    This is generally only used at the repository provider level in order to provide type-specific information for building criteria to execute a query against a data store.

    Author:
    Jeff Fischer, Phillip Verheyden (phillipuniverse)
    • Method Detail

      • parseArguments

        List<Object> parseArguments​(String selector,
                                    cz.jirutka.rsql.parser.ast.ComparisonOperator operator,
                                    List<String> arguments,
                                    Class<?> rootType,
                                    FilterHelper.LinkField linkField)
        Returns string-based arguments into their real typed equivalents.
        Parameters:
        selector - an RSQL selector, usually a field
        operator - operator from the selector to the arguments
        arguments - what will be parsed out
        rootType - the type that this is being parsed for. This is generally used at the repository layer so this is usually a repository class
        linkField - Specifies additional information for this selector denoting a Link annotated field. May be null if the selector does not reference a link field.
        Returns:
        typed equivalents of arguments after parsing
      • parseArguments

        List<Object> parseArguments​(String selector,
                                    cz.jirutka.rsql.parser.ast.ComparisonOperator operator,
                                    List<String> arguments,
                                    Class<?> rootType)
        Returns string-based arguments into their real typed equivalents.
        Parameters:
        selector - an RSQL selector, usually a field
        operator - operator from the selector to the arguments
        arguments - what will be parsed out
        rootType - the type that this is being parsed for. This is generally used at the repository layer so this is usually a repository class
        Returns:
        typed equivalents of arguments after parsing