org.apache.ignite.springdata20.repository.query.spel

## Class SpelQueryContext

- java.lang.Object
- - org.apache.ignite.springdata20.repository.query.spel.SpelQueryContext

- Direct Known Subclasses:
    SpelQueryContext.EvaluatingSpelQueryContext

      public class SpelQueryContext
      extends Object

  Source of `SpelQueryContext.SpelExtractor` encapsulating configuration often common for all queries.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SpelQueryContext.EvaluatingSpelQueryContext` An extension of `SpelQueryContext` that can create `SpelEvaluator` instances as it also knows about a `EvaluationContextProvider`.
    `class` | `SpelQueryContext.SpelExtractor` Parses a query string, identifies the contained SpEL expressions, replaces them with bind parameters and offers a `Map` from those bind parameters to the spel expression.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SpelQueryContext` | `of(BiFunction<Integer,String,String> parameterNameSource, BiFunction<String,String,String> replacementSource)` Of spel query context.
    `SpelQueryContext.SpelExtractor` | `parse(String qry)` Parses the query for SpEL expressions using the pattern: <prefix>#{<spel>} with prefix being the character ':' or '?'.
    `SpelQueryContext.EvaluatingSpelQueryContext` | `withEvaluationContextProvider(org.springframework.data.repository.query.EvaluationContextProvider provider)` Createsa `SpelQueryContext.EvaluatingSpelQueryContext` from the current one and the given `EvaluationContextProvider`*.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### of

          public static SpelQueryContext of(BiFunction<Integer,String,String> parameterNameSource,
                                            BiFunction<String,String,String> replacementSource)

      Of spel query context.
      Parameters:
        `parameterNameSource` - the parameter name source
        `replacementSource` - the replacement source
      Returns:
        the spel query context

    - #### parse

          public SpelQueryContext.SpelExtractor parse(String qry)

      Parses the query for SpEL expressions using the pattern:

           <prefix>#{<spel>}

      with prefix being the character ':' or '?'. Parsing honors quoted Strings enclosed in single or double quotation marks.

      Parameters:
        `qry` - a query containing SpEL expressions in the format described above. Must not be null.
      Returns:
        A `SpelQueryContext.SpelExtractor` which makes the query with SpEL expressions replaced by bind parameters and a map from bind parameter to SpEL expression available. Guaranteed to be not null.

    - #### withEvaluationContextProvider

          public SpelQueryContext.EvaluatingSpelQueryContext withEvaluationContextProvider(org.springframework.data.repository.query.EvaluationContextProvider provider)

      Createsa `SpelQueryContext.EvaluatingSpelQueryContext` from the current one and the given `EvaluationContextProvider`*.
      Parameters:
        `provider` - must not be null.
      Returns:
        Evaluating Spel QueryContext

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020