Class QueryParameterUtils

java.lang.Object
io.jmix.core.impl.repository.query.utils.QueryParameterUtils

public class QueryParameterUtils extends Object
Internal helper with query processing logic common for both JmixCustomLoadQuery and JmixScalarQuery.
  • Field Details

  • 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 metadata
      method - java method definition
      query - to process
      namedParametersBindings - 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)