public String inferTableComment(Class<?> entity, String defaultComment) {
String comment = defaultComment;
Entity annotation = entity.getAnnotation(Entity.class);
if (isNotBlank(annotation.comment())) {
comment = annotation.comment().trim().replaceAll("'","''");
}
return comment;
}
public <T> Pair<ConsistencyLevel, ConsistencyLevel> findConsistencyLevels(Class<T> entity, String tableName, ConfigurationContext configContext) {