public class SpelQueryContext extends Object
SpelQueryContext.SpelExtractor
encapsulating configuration often common for all queries.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
QueryMethodEvaluationContextProvider . |
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. |
Modifier and Type | Method and Description |
---|---|
static SpelQueryContext |
of(@NonNull BiFunction<Integer,String,String> parameterNameSource,
@NonNull BiFunction<String,String,String> replacementSource) |
SpelQueryContext.SpelExtractor |
parse(String query)
Parses the query for SpEL expressions using the pattern:
<prefix>#{<spel>}
with prefix being the character ':' or '?'.
|
SpelQueryContext.EvaluatingSpelQueryContext |
withEvaluationContextProvider(QueryMethodEvaluationContextProvider provider)
Createsa
SpelQueryContext.EvaluatingSpelQueryContext from the current one and the given
QueryMethodEvaluationContextProvider . |
public SpelQueryContext.SpelExtractor parse(String query)
<prefix>#{<spel>}with prefix being the character ':' or '?'. Parsing honors quoted Strings enclosed in single or double quotation marks.
query
- a query containing SpEL expressions in the format described above. Must not be null.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.public SpelQueryContext.EvaluatingSpelQueryContext withEvaluationContextProvider(QueryMethodEvaluationContextProvider provider)
SpelQueryContext.EvaluatingSpelQueryContext
from the current one and the given
QueryMethodEvaluationContextProvider
.provider
- must not be null.public static SpelQueryContext of(@NonNull @NonNull BiFunction<Integer,String,String> parameterNameSource, @NonNull @NonNull BiFunction<String,String,String> replacementSource)
Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.