code: public static String likePrefix(String param) {
          return param != null ? param.toLowerCase().replace("_", "\\_").replace("%", "\\%") + "%" : null;
      }
docs: Builds prefix search parameter for LIKE operator from non-formatted string.
  Basically, this method insert escape character before special symbols and adds '%' at the end.