code: private String getConcatSql(List<String> values) {
          if (values.size() == 1) {
              return values.get(0);
          } else {
              return START_CONCAT + values.get(0) + SEP_CONCAT + getConcatSql(values.subList(1, values.size())) + END_CONCAT;
          }
      }
docs: Recursive way of building CONCAT instruction
  
  @param values a non null List of String
  @return a String containing the CONCAT instruction with all elements, or only a value if there is only one element in the list