Class ValueExpressionQueryRewriter.ParsedQuery
java.lang.Object
org.springframework.data.repository.query.ValueExpressionQueryRewriter.ParsedQuery
- Enclosing class:
- ValueExpressionQueryRewriter
Parses a query string, identifies the contained Value expressions, replaces them with bind parameters and offers a
Map
from those bind parameters to the value expression.
The parser detects quoted parts of the query string and does not detect value expressions inside such quoted parts of the query.
- Author:
- Jens Schauder, Oliver Gierke, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptiongetParameter
(String name) A Map from parameter name to Value Expression.The query with all the Value Expressions replaced with bind parameters.boolean
Returns whether the query contains Value Expressions.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 Value 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.
-
hasParameterBindings
public boolean hasParameterBindings()Returns whether the query contains Value Expressions.- Returns:
- true if the query contains Value Expressions.
-
getParameterMap
A Map from parameter name to Value Expression.- Returns:
- Guaranteed to be not null.
-