/** * Reconcatenates the given camel-case source {@link String} using the given delimiter. Will split up the camel-case * {@link String} and use an uncapitalized version of the parts. * * @param source must not be {@literal null}. * @param delimiter must not be {@literal null}. * @return */ public static String reconcatenateCamelCase(String source, String delimiter) { Assert.notNull(source, "Source string must not be null!"); Assert.notNull(delimiter, "Delimiter must not be null!"); return StringUtils.collectionToDelimitedString(splitCamelCaseToLower(source), delimiter); }
@Override public String getFieldName(PersistentProperty<?> property) { List<String> parts = ParsingUtils.splitCamelCaseToLower(property.getName()); List<String> result = new ArrayList<>(); for (String part : parts) { String candidate = preparePart(part); if (StringUtils.hasText(candidate)) { result.add(candidate); } } return StringUtils.collectionToDelimitedString(result, delimiter); }