Class QueryParameterUtils
java.lang.Object
io.jmix.core.impl.repository.query.utils.QueryParameterUtils
Internal helper with query processing logic common for both
JmixCustomLoadQuery
and JmixScalarQuery.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidmatchQueryParameters(String query, Set<String> parameterNames, org.springframework.data.repository.query.Parameters<? extends org.springframework.data.repository.query.Parameters, ? extends org.springframework.data.repository.query.Parameter> bindableParameters, Map<String, Integer> namedParametersBindings, boolean fromPositionParameters, Method method) static StringreplaceQueryParameters(org.springframework.data.repository.query.QueryMethod queryMethod, Method method, String query, Map<String, Integer> namedParametersBindings) Binds parameter names in the query with positions of method arguments.
-
Field Details
-
PARAMETER_TEMPLATE
- See Also:
-
PARAMETER_PREFIX
- See Also:
-
-
Constructor Details
-
QueryParameterUtils
public QueryParameterUtils()
-
-
Method Details
-
replaceQueryParameters
public static String replaceQueryParameters(org.springframework.data.repository.query.QueryMethod queryMethod, Method method, String query, Map<String, Integer> namedParametersBindings) Binds parameter names in the query with positions of method arguments. Replaces positional parameters with named ones if needed.- Parameters:
queryMethod- Spring query method metadatamethod- java method definitionquery- to processnamedParametersBindings- map to store binding- Returns:
- modified query
-
matchQueryParameters
protected static void matchQueryParameters(String query, Set<String> parameterNames, org.springframework.data.repository.query.Parameters<? extends org.springframework.data.repository.query.Parameters, ? extends org.springframework.data.repository.query.Parameter> bindableParameters, Map<String, Integer> namedParametersBindings, boolean fromPositionParameters, Method method)
-