Class SpelQueryContext.SpelExtractor
java.lang.Object
org.springframework.data.repository.query.SpelQueryContext.SpelExtractor
- Enclosing class:
- SpelQueryContext
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.
The parser detects quoted parts of the query string and does not detect SpEL expressions inside such quoted parts of the query.
- Since:
- 2.1
- Author:
- Jens Schauder, Oliver Gierke, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptiongetParameter
(String name) The query with all the SpEL expressions replaced with bind parameters.boolean
isQuoted
(int index) Return whether thequery
atindex
is quoted.int
size()
Returns the number of expressions in this extractor.
-
Method Details
-
getQueryString
The query with all the SpEL expressions replaced with bind parameters.- Returns:
- Guaranteed to be not null.
-
isQuoted
public boolean isQuoted(int index) Return whether thequery
atindex
is quoted.- Parameters:
index
-- Returns:
- true if quoted; false otherwise.
-
getParameter
-
size
public int size()Returns the number of expressions in this extractor.- Returns:
- the number of expressions in this extractor.
- Since:
- 3.1.3
-