public static String createSqlLikeStringFromWildCardFilter(final String filter) {
        Objects.requireNonNull(filter);
        if (filter.isBlank()) {
            return filter;
        } else {
            return filter
                    .replace("%", "\\%") // escape sql multi-char wild card
                    .replace("_", "\\_") // escape sql single-char wild card
                    .replace(STROOM_WILD_CARD_CHAR, "%"); // now replace stroom wild cards with SQL equivalent
        }
    }
Convert a Stroom wild carded string into a string suitable for use in SQL LIKE commands.
SQL wild card chars '%' and '_' will be escaped by prefixing with a '\'. All instances
of '*' will be replaced with '%'. Escaping the '*' is not supported. The return value should
be used in a bind variable to remove the risk of SQL injection.
stroom-util/src/main/java/stroom/util/string/PatternUtil.java