Class AbstractQueryEngine

    • Field Detail

      • m_mapParsedQuery

        protected final Map m_mapParsedQuery
        Map of cached ParsedQuery instances, keyed by their corresponding final query string.
    • Constructor Detail

      • AbstractQueryEngine

        public AbstractQueryEngine()
    • Method Detail

      • parseQueryString

        protected AbstractQueryEngine.ParsedQuery parseQueryString​(String sQuery)
        Parse a query string containing parameter type hints.

        Parameter type hints allow users to specify the type conversion that should be performed on the string value of the parameter defined in the query string portion of the URL before it is bound to the query.

        Parameters:
        sQuery - a query string to parse, which contains zero or more parameter bindings, possibly with type hints
        Returns:
        a ParsedQuery instance containing both the original query string with parameter type hints removed, and the map of parameter types keyed by parameter name
      • resolveParameterType

        protected Class resolveParameterType​(String sType)
        Return the Class that corresponds with the given type hint.
        Parameters:
        sType - the type hint
        Returns:
        the Class that corresponds with the given type hint
      • createBindings

        protected Map<String,​Object> createBindings​(Map<String,​Object> mapParams,
                                                          Map<String,​Class> mapParamTypes)
        Converts string parameters to their required types.
        Parameters:
        mapParams - a map of string parameter values
        mapParamTypes - a map of required parameter types
        Returns:
        a map of parameters converted to a required type
      • convertList

        protected List convertList​(List<String> listSource,
                                   Class clzElementType)
        Convert all elements of the source list into the specified type.
        Parameters:
        listSource - source list
        clzElementType - element type
        Returns:
        converted list