org.mybatis.generator.api.Plugin Java Examples

The following examples show how to use org.mybatis.generator.api.Plugin. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 6 votes vote down vote up
public boolean modelGetterMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn,
        IntrospectedTable introspectedTable,
        Plugin.ModelClassType modelClassType) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.modelGetterMethodGenerated(method, topLevelClass,
                introspectedColumn, introspectedTable, modelClassType)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #2
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 6 votes vote down vote up
public boolean modelSetterMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn,
        IntrospectedTable introspectedTable,
        Plugin.ModelClassType modelClassType) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.modelSetterMethodGenerated(method, topLevelClass,
                introspectedColumn, introspectedTable, modelClassType)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #3
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 6 votes vote down vote up
@Override
public boolean modelSetterMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn,
        IntrospectedTable introspectedTable,
        Plugin.ModelClassType modelClassType) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.modelSetterMethodGenerated(method, topLevelClass,
                introspectedColumn, introspectedTable, modelClassType)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #4
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 6 votes vote down vote up
@Override
public boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(
        Method method, Interface interfaze,
        IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(
                method, interfaze, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #5
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 6 votes vote down vote up
@Override
public boolean providerUpdateByPrimaryKeySelectiveMethodGenerated(
        Method method, TopLevelClass topLevelClass,
        IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.providerUpdateByPrimaryKeySelectiveMethodGenerated(method,
                topLevelClass, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #6
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean providerInsertSelectiveMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.providerInsertSelectiveMethodGenerated(method,
                topLevelClass, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #7
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean sqlMapBlobColumnListElementGenerated(XmlElement element,
        IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.sqlMapBlobColumnListElementGenerated(element,
                introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #8
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public boolean modelExampleClassGenerated(TopLevelClass tlc, IntrospectedTable introspectedTable) {
	boolean rc = true;

	for (Plugin plugin : plugins) {
		if (!plugin.modelExampleClassGenerated(tlc, introspectedTable)) {
			rc = false;
			break;
		}
	}

	return rc;
}
 
Example #9
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles() {
	List<GeneratedJavaFile> answer = new ArrayList<GeneratedJavaFile>();
	for (Plugin plugin : plugins) {
		List<GeneratedJavaFile> temp = plugin.contextGenerateAdditionalJavaFiles();
		if (temp != null) {
			answer.addAll(temp);
		}
	}
	return answer;
}
 
Example #10
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public boolean clientSelectAllMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
	boolean rc = true;

	for (Plugin plugin : plugins) {
		if (!plugin.clientSelectAllMethodGenerated(method, topLevelClass, introspectedTable)) {
			rc = false;
			break;
		}
	}

	return rc;
}
 
Example #11
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientInsertSelectiveMethodGenerated(Method method,
        Interface interfaze, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientInsertSelectiveMethodGenerated(method, interfaze,
                introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #12
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(
                element, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #13
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(
        XmlElement element, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.sqlMapUpdateByPrimaryKeySelectiveElementGenerated(
                element, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #14
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public boolean providerUpdateByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
	boolean rc = true;

	for (Plugin plugin : plugins) {
		if (!plugin.providerUpdateByExampleWithoutBLOBsMethodGenerated(method, topLevelClass, introspectedTable)) {
			rc = false;
			break;
		}
	}

	return rc;
}
 
Example #15
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean clientUpdateByExampleWithBLOBsMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientUpdateByExampleWithBLOBsMethodGenerated(method,
                topLevelClass, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #16
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean providerDeleteByExampleMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.providerDeleteByExampleMethodGenerated(method,
                topLevelClass, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #17
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean providerInsertSelectiveMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.providerInsertSelectiveMethodGenerated(method,
                topLevelClass, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #18
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapDeleteByExampleElementGenerated(XmlElement element, IntrospectedTable table) {
	boolean rc = true;

	for (Plugin plugin : plugins) {
		if (!plugin.sqlMapDeleteByExampleElementGenerated(element, table)) {
			rc = false;
			break;
		}
	}

	return rc;
}
 
Example #19
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean clientDeleteByPrimaryKeyMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientDeleteByPrimaryKeyMethodGenerated(method,
                topLevelClass, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #20
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
	boolean rc = true;

	for (Plugin plugin : plugins) {
		if (!plugin.sqlMapUpdateByPrimaryKeySelectiveElementGenerated(element, introspectedTable)) {
			rc = false;
			break;
		}
	}

	return rc;
}
 
Example #21
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean clientCountByExampleMethodGenerated(Method method,
        TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientCountByExampleMethodGenerated(method, topLevelClass,
                introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #22
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapResultMapWithBLOBsElementGenerated(XmlElement element,
        IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.sqlMapResultMapWithBLOBsElementGenerated(element,
                introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #23
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapDeleteByExampleElementGenerated(XmlElement element,
        IntrospectedTable table) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.sqlMapDeleteByExampleElementGenerated(element, table)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #24
Source File: Context.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
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);
	}
 
Example #25
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method,
        Interface interfaze, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientUpdateByPrimaryKeySelectiveMethodGenerated(method,
                interfaze, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #26
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapUpdateByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
	boolean rc = true;

	for (Plugin plugin : plugins) {
		if (!plugin.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(element, introspectedTable)) {
			rc = false;
			break;
		}
	}

	return rc;
}
 
Example #27
Source File: PluginAggregator.java    From mybatis-generator-core-fix with Apache License 2.0 5 votes vote down vote up
public boolean sqlMapInsertElementGenerated(XmlElement element,
        IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin
                .sqlMapInsertElementGenerated(element, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #28
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method,
        Interface interfaze, IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientSelectByExampleWithBLOBsMethodGenerated(method,
                interfaze, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}
 
Example #29
Source File: PluginAggregator.java    From mybatis-generator-plus with Apache License 2.0 5 votes vote down vote up
public boolean providerInsertSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
	boolean rc = true;

	for (Plugin plugin : plugins) {
		if (!plugin.providerInsertSelectiveMethodGenerated(method, topLevelClass, introspectedTable)) {
			rc = false;
			break;
		}
	}

	return rc;
}
 
Example #30
Source File: PluginAggregator.java    From mapper-generator-javafx with Apache License 2.0 5 votes vote down vote up
@Override
public boolean clientGenerated(Interface interfaze,
        IntrospectedTable introspectedTable) {
    boolean rc = true;

    for (Plugin plugin : plugins) {
        if (!plugin.clientGenerated(interfaze, introspectedTable)) {
            rc = false;
            break;
        }
    }

    return rc;
}