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


Java PluginAggregator类代码示例

本文整理汇总了Java中org.mybatis.generator.internal.PluginAggregator的典型用法代码示例。如果您正苦于以下问题:Java PluginAggregator类的具体用法?Java PluginAggregator怎么用?Java PluginAggregator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: generateFiles

import org.mybatis.generator.internal.PluginAggregator; //导入依赖的package包/类
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();
            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:funny5258,项目名称:autocode,代码行数:32,代码来源:Context.java

示例2: generateFiles

import org.mybatis.generator.internal.PluginAggregator; //导入依赖的package包/类
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());


		//每个表自定义包路径
		setJavaFilesCustomTargetPackage(generatedJavaFiles);
		setXmlFilesCustomTargetPackage(generatedJavaFiles);
	}
 
开发者ID:handosme,项目名称:mybatis-generator-plus,代码行数:37,代码来源:Context.java

示例3: reinitialize

import org.mybatis.generator.internal.PluginAggregator; //导入依赖的package包/类
private void reinitialize(IntrospectedTable introspectedTable) {
    try {
        helloKitty = introspectedTable;
        Plugin plugins = context.getPlugins();
        pluginAggregator.set(context, new PluginAggregator());
        introspectedTable.initialize();
        pluginAggregator.set(context, plugins);
    } catch (IllegalAccessException e) {
        e.printStackTrace();
    }
}
 
开发者ID:vsl1978,项目名称:mybatis-generator-pluginsplus,代码行数:12,代码来源:CommonTablePropertiesPlugin.java

示例4: generateFiles

import org.mybatis.generator.internal.PluginAggregator; //导入依赖的package包/类
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:fnyexx,项目名称:mybator,代码行数:32,代码来源:Context.java

示例5: generateFiles

import org.mybatis.generator.internal.PluginAggregator; //导入依赖的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

示例6: generateFiles

import org.mybatis.generator.internal.PluginAggregator; //导入依赖的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.internal.PluginAggregator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。