当前位置: 首页>>代码示例>>Java>>正文


Java IntrospectedTable.calculateGenerators方法代码示例

本文整理汇总了Java中org.mybatis.generator.api.IntrospectedTable.calculateGenerators方法的典型用法代码示例。如果您正苦于以下问题:Java IntrospectedTable.calculateGenerators方法的具体用法?Java IntrospectedTable.calculateGenerators怎么用?Java IntrospectedTable.calculateGenerators使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.mybatis.generator.api.IntrospectedTable的用法示例。


在下文中一共展示了IntrospectedTable.calculateGenerators方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateFiles

import org.mybatis.generator.api.IntrospectedTable; //导入方法依赖的package包/类
/**
 * Generate files.
 *
 * @param callback
 *            the callback
 * @param generatedJavaFiles
 *            the generated java files
 * @param generatedXmlFiles
 *            the generated xml files
 * @param warnings
 *            the warnings
 * @throws InterruptedException
 *             the interrupted exception
 */
public void generateFiles(ProgressCallback callback,
        List<GeneratedJavaFile> generatedJavaFiles,
        List<GeneratedXmlFile> generatedXmlFiles, List<String> warnings)
        throws InterruptedException {

    pluginAggregator = new PluginAggregator();
    for (PluginConfiguration pluginConfiguration : pluginConfigurations) {
        Plugin plugin = ObjectFactory.createPlugin(this,
                pluginConfiguration);
        if (plugin.validate(warnings)) {
            pluginAggregator.addPlugin(plugin);
        } else {
            warnings.add(getString("Warning.24", //$NON-NLS-1$
                    pluginConfiguration.getConfigurationType(), id));
        }
    }

    if (introspectedTables != null) {
        for (IntrospectedTable introspectedTable : introspectedTables) {
            callback.checkCancel();

            introspectedTable.initialize();
            introspectedTable.calculateGenerators(warnings, callback);
            generatedJavaFiles.addAll(introspectedTable
                    .getGeneratedJavaFiles());
            generatedXmlFiles.addAll(introspectedTable
                    .getGeneratedXmlFiles());

            generatedJavaFiles.addAll(pluginAggregator
                    .contextGenerateAdditionalJavaFiles(introspectedTable));
            generatedXmlFiles.addAll(pluginAggregator
                    .contextGenerateAdditionalXmlFiles(introspectedTable));
        }
    }

    generatedJavaFiles.addAll(pluginAggregator
            .contextGenerateAdditionalJavaFiles());
    generatedXmlFiles.addAll(pluginAggregator
            .contextGenerateAdditionalXmlFiles());
}
 
开发者ID:bandaotixi,项目名称:generator_mybatis,代码行数:55,代码来源:Context.java

示例2: generateFiles

import org.mybatis.generator.api.IntrospectedTable; //导入方法依赖的package包/类
/**
 * Generate files.
 *
 * @param callback
 *            the callback
 * @param generatedJavaFiles
 *            the generated java files
 * @param generatedXmlFiles
 *            the generated xml files
 * @param warnings
 *            the warnings
 * @throws InterruptedException
 *             the interrupted exception
 */
public void generateFiles(ProgressCallback callback,
        List<GeneratedJavaFile> generatedJavaFiles,
        List<GeneratedXmlFile> generatedXmlFiles, List<String> warnings)
        throws InterruptedException {

    pluginAggregator = new PluginAggregator();
    for (PluginConfiguration pluginConfiguration : pluginConfigurations) {
        Plugin plugin = ObjectFactory.createPlugin(this,
                pluginConfiguration);
        if (plugin.validate(warnings)) {
            pluginAggregator.addPlugin(plugin);
        } else {
            warnings.add(getString("Warning.24", //$NON-NLS-1$
                    pluginConfiguration.getConfigurationType(), id));
        }
    }

    if (introspectedTables != null) {
        for (IntrospectedTable introspectedTable : introspectedTables) {
            callback.checkCancel();

            // 初始化introspectedTable
            introspectedTable.initialize();


            introspectedTable.calculateGenerators(warnings, callback);


            generatedJavaFiles.addAll(introspectedTable
                    .getGeneratedJavaFiles());
            generatedXmlFiles.addAll(introspectedTable
                    .getGeneratedXmlFiles());

            generatedJavaFiles.addAll(pluginAggregator
                    .contextGenerateAdditionalJavaFiles(introspectedTable));
            generatedXmlFiles.addAll(pluginAggregator
                    .contextGenerateAdditionalXmlFiles(introspectedTable));
        }
    }

    generatedJavaFiles.addAll(pluginAggregator
            .contextGenerateAdditionalJavaFiles());
    generatedXmlFiles.addAll(pluginAggregator
            .contextGenerateAdditionalXmlFiles());
}
 
开发者ID:nextyu,项目名称:summer-mybatis-generator,代码行数:60,代码来源:Context.java


注:本文中的org.mybatis.generator.api.IntrospectedTable.calculateGenerators方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。