code: @SuppressWarnings({ "unused", "null" })
    public static @NotNull String jcrQueryLiteral(@NotNull String value) {
      if (value == null) {
        throw new IllegalArgumentException("Invalid query string value: " + value);
      }
      return "'" + StringUtils.replace(value, "'", "''") + "'";
    }
docs: Convert a string to a literal, suitable for inclusion in a query (XPath or JCR-SQL2).
  See JSR-283 specification v2.0, Section 4.6.6.19.
  @param value Any string.
  @return A valid JCR query string literal, including enclosing quotes.