protected String escape(EntityType entityType, String name) {
        int suffix = 0;
        while (true) {
            String candidate = suffix > 0 ? name + suffix : name;
            if (entityType.getEscapedPropertyNames().contains(candidate)) {
                suffix++;
            } else {
                return candidate;
            }
        }
    }
{@code AbstractNamingStrategy} is an abstract base class for {@link NamingStrategy} implementations

@author tiwe
querydsl-sql-codegen/src/main/java/com/querydsl/sql/codegen/AbstractNamingStrategy.java