code: public static String convertToString(Collection<? extends Object> parameters) {
          if (parameters == null || parameters.isEmpty())
              return "";
  
          StringBuilder result = new StringBuilder();
          for (Object param : parameters) {
              if (param instanceof String)
                  param = "'" + param + "'";
              if (result.length() != 0)
                  result.append(",");
              result.append(param);
          }
  
          log.debug("restriction list converted to {}", result);
  
          return result.toString();
      }
docs: Converts a collection with IN parameters to a plain string representation
  
  @param parameters
  collection with IN parameters
  @return plain string representation