protected List<IntrospectedTable> calculateIntrospectedTables(
            DatabaseConfig config,
            Map<IntrospectedTable, List<IntrospectedColumn>> columns) throws SQLException {
        List<IntrospectedTable> answer = new ArrayList<IntrospectedTable>();
        //获取表注释信息
        Map<String, String> tableCommentsMap = getTableComments(config);
        Map<String, Map<String, String>> tableColumnCommentsMap = getColumnComments(config);
        for (Map.Entry<IntrospectedTable, List<IntrospectedColumn>> entry : columns
                .entrySet()) {
            IntrospectedTable table = entry.getKey();
            if (tableCommentsMap != null && tableCommentsMap.containsKey(table.getName())) {
                table.setRemarks(tableCommentsMap.get(table.getName()));
            }
            Map<String, String> columnCommentsMap = null;
            if (tableColumnCommentsMap != null && tableColumnCommentsMap.containsKey(table.getName())) {
                columnCommentsMap = tableColumnCommentsMap.get(table.getName());
            }
            for (IntrospectedColumn introspectedColumn : entry.getValue()) {
                FullyQualifiedJavaType fullyQualifiedJavaType = calculateJavaType(introspectedColumn);
                if (fullyQualifiedJavaType != null) {
                    introspectedColumn.setFullyQualifiedJavaType(fullyQualifiedJavaType);
                    introspectedColumn.setJdbcTypeName(calculateJdbcTypeName(introspectedColumn));
                }
                //转换为驼峰形式
                if (useCamelCase) {
                    introspectedColumn.setJavaProperty(JavaBeansUtil.getCamelCaseString(introspectedColumn.getName(), false));
                } else {
                    introspectedColumn.setJavaProperty(JavaBeansUtil.getValidPropertyName(introspectedColumn.getName()));
                }
                //处理注释
                if (columnCommentsMap != null && columnCommentsMap.containsKey(introspectedColumn.getName())) {
                    introspectedColumn.setRemarks(columnCommentsMap.get(introspectedColumn.getName()));
                }
                table.addColumn(introspectedColumn);
            }
            calculatePrimaryKey(config, table);
            answer.add(table);
        }
        return answer;
    }
protected List<IntrospectedTable> calculateIntrospectedTables(
            DatabaseConfig config,
            Map<IntrospectedTable, List<IntrospectedColumn>> columns) throws SQLException {
        List<IntrospectedTable> answer = new ArrayList<IntrospectedTable>();
        
        Map<String, String> tableCommentsMap = getTableComments(config);
        Map<String, Map<String, String>> tableColumnCommentsMap = getColumnComments(config);
        for (Map.Entry<IntrospectedTable, List<IntrospectedColumn>> entry : columns
                .entrySet()) {
            IntrospectedTable table = entry.getKey();
            if (tableCommentsMap != null && tableCommentsMap.containsKey(table.getName())) {
                table.setRemarks(tableCommentsMap.get(table.getName()));
            }
            Map<String, String> columnCommentsMap = null;
            if (tableColumnCommentsMap != null && tableColumnCommentsMap.containsKey(table.getName())) {
                columnCommentsMap = tableColumnCommentsMap.get(table.getName());
            }
            for (IntrospectedColumn introspectedColumn : entry.getValue()) {
                FullyQualifiedJavaType fullyQualifiedJavaType = calculateJavaType(introspectedColumn);
                if (fullyQualifiedJavaType != null) {
                    introspectedColumn.setFullyQualifiedJavaType(fullyQualifiedJavaType);
                    introspectedColumn.setJdbcTypeName(calculateJdbcTypeName(introspectedColumn));
                }
                
                if (useCamelCase) {
                    introspectedColumn.setJavaProperty(JavaBeansUtil.getCamelCaseString(introspectedColumn.getName(), false));
                } else {
                    introspectedColumn.setJavaProperty(JavaBeansUtil.getValidPropertyName(introspectedColumn.getName()));
                }
                
                if (columnCommentsMap != null && columnCommentsMap.containsKey(introspectedColumn.getName())) {
                    introspectedColumn.setRemarks(columnCommentsMap.get(introspectedColumn.getName()));
                }
                table.addColumn(introspectedColumn);
            }
            calculatePrimaryKey(config, table);
            answer.add(table);
        }
        return answer;
    }
protected List < IntrospectedTable > calculateIntrospectedTables ( DatabaseConfig config , Map < IntrospectedTable , List < IntrospectedColumn > > columns ) throws SQLException { List < IntrospectedTable > answer = new ArrayList < IntrospectedTable > ( ) ; //获取表注释信息 Map < String , String > tableCommentsMap = getTableComments ( config ) ; Map < String , Map < String , String > > tableColumnCommentsMap = getColumnComments ( config ) ; for ( Map . Entry < IntrospectedTable , List < IntrospectedColumn > > entry : columns . entrySet ( ) ) { IntrospectedTable table = entry . getKey ( ) ; if ( tableCommentsMap != null && tableCommentsMap . containsKey ( table . getName ( ) ) ) { table . setRemarks ( tableCommentsMap . get ( table . getName ( ) ) ) ; } Map < String , String > columnCommentsMap = null ; if ( tableColumnCommentsMap != null && tableColumnCommentsMap . containsKey ( table . getName ( ) ) ) { columnCommentsMap = tableColumnCommentsMap . get ( table . getName ( ) ) ; } for ( IntrospectedColumn introspectedColumn : entry . getValue ( ) ) { FullyQualifiedJavaType fullyQualifiedJavaType = calculateJavaType ( introspectedColumn ) ; if ( fullyQualifiedJavaType != null ) { introspectedColumn . setFullyQualifiedJavaType ( fullyQualifiedJavaType ) ; introspectedColumn . setJdbcTypeName ( calculateJdbcTypeName ( introspectedColumn ) ) ; } //转换为驼峰形式 if ( useCamelCase ) { introspectedColumn . setJavaProperty ( JavaBeansUtil . getCamelCaseString ( introspectedColumn . getName ( ) , false ) ) ; } else { introspectedColumn . setJavaProperty ( JavaBeansUtil . getValidPropertyName ( introspectedColumn . getName ( ) ) ) ; } //处理注释 if ( columnCommentsMap != null && columnCommentsMap . containsKey ( introspectedColumn . getName ( ) ) ) { introspectedColumn . setRemarks ( columnCommentsMap . get ( introspectedColumn . getName ( ) ) ) ; } table . addColumn ( introspectedColumn ) ; } calculatePrimaryKey ( config , table ) ; answer . add ( table ) ; } return answer ; }
处理表

@param config
@param columns
@return
@throws SQLException
处理表