|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mybatis.generator.api.PluginAdapter
org.mybatis.generator.plugins.SqlMapConfigPlugin
public class SqlMapConfigPlugin
This plugin generates an SqlMapConfig file containing sqlMap entries for all generated SQL maps. This demonstrates hooking into the code generation lifecycle and generating additional XML files.
This plugin accepts three properties:
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.mybatis.generator.api.Plugin |
---|
Plugin.ModelClassType |
Field Summary |
---|
Fields inherited from class org.mybatis.generator.api.PluginAdapter |
---|
context, properties |
Constructor Summary | |
---|---|
SqlMapConfigPlugin()
|
Method Summary | |
---|---|
java.util.List<GeneratedXmlFile> |
contextGenerateAdditionalXmlFiles()
This method can be used to generate any additional XML file needed by your implementation. |
boolean |
sqlMapGenerated(GeneratedXmlFile sqlMap,
IntrospectedTable introspectedTable)
This method is called when the SqlMap file has been generated. |
boolean |
validate(java.util.List<java.lang.String> warnings)
This method is called after all the setXXX methods are called, but before any other method is called. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SqlMapConfigPlugin()
Method Detail |
---|
public boolean validate(java.util.List<java.lang.String> warnings)
Plugin
warnings
- add strings to this list to specify warnings. For example, if
the plugin is invalid, you should specify why. Warnings are
reported to users after the completion of the run.
public java.util.List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles()
Plugin
contextGenerateAdditionalXmlFiles
in interface Plugin
contextGenerateAdditionalXmlFiles
in class PluginAdapter
public boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable)
Plugin
sqlMapGenerated
in interface Plugin
sqlMapGenerated
in class PluginAdapter
sqlMap
- the generated file (containing the file name, package name,
and project name)introspectedTable
- The class containing information about the table as
introspected from the database
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |