class SearchUtil {

    public static String replaceWildcards(final String input) {
        if (input == null) {
            return null;
        } else {
            return input.replace(ESCAPE, ESCAPE + ESCAPE)
                    .replace(WILDCARD_ALL_REPLACEMENT, ESCAPE + WILDCARD_ALL_REPLACEMENT)
                    .replace(WILDCARD_SINGLE_REPLACEMENT, ESCAPE + WILDCARD_SINGLE_REPLACEMENT)
                    .replace(WILDCARD_ALL, WILDCARD_ALL_REPLACEMENT)
                    .replace(WILDCARD_SINGLE, WILDCARD_SINGLE_REPLACEMENT);
        }
    }

    private  SearchUtil();

}