278279280281282283284285286287288289
StringBuilder fieldsBuilder = new StringBuilder(); for (String field_name : index) { fieldsBuilder.append(',').append(field_name); } Unique u = new Unique(); u.setFields(fieldsBuilder.substring(1)); e.getUniques().add(u); } }