Package io.jmix.core

Class QueryUtils

java.lang.Object
io.jmix.core.QueryUtils

public class QueryUtils extends Object
  • Field Details

  • Constructor Details

    • QueryUtils

      public QueryUtils()
  • Method Details

    • escapeForLike

      public static String escapeForLike(String value)
      Escapes a parameter value for a 'like' operation in JPQL query
      Parameters:
      value - parameter value
      Returns:
      escaped parameter value
    • escapeForLike

      public static String escapeForLike(String value, String escapeCharacter)
      Escapes a parameter value for a 'like' operation in JPQL query
      Parameters:
      value - parameter value
      escapeCharacter - escape character
      Returns:
      escaped parameter value
    • applyQueryStringProcessors

      public static String applyQueryStringProcessors(Collection<QueryStringProcessor> processors, String query, Class<?> entityClass)
      Returns the query string after applying the given processors on it.
      Parameters:
      processors - query processors
      query - query string
      entityClass - queried entity
      Returns:
      result of the processing