|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ibatis.ibator.api.IbatorPluginAdapter
org.apache.ibatis.ibator.plugins.SqlMapConfigPlugin
public class SqlMapConfigPlugin
This plugin generates an SqlMapConfig file containing sqlMap entries for SQL maps generated by ibator. This demonstrates hooking into the ibator code generation lifecycle and generating additional XML files.
This plugin accepts three properties:
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.ibatis.ibator.api.IbatorPlugin |
---|
IbatorPlugin.ModelClassType |
Field Summary |
---|
Fields inherited from class org.apache.ibatis.ibator.api.IbatorPluginAdapter |
---|
ibatorContext, 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)
IbatorPlugin
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 ibator run.
public java.util.List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles()
IbatorPlugin
contextGenerateAdditionalXmlFiles
in interface IbatorPlugin
contextGenerateAdditionalXmlFiles
in class IbatorPluginAdapter
public boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable)
IbatorPlugin
sqlMapGenerated
in interface IbatorPlugin
sqlMapGenerated
in class IbatorPluginAdapter
sqlMap
- the generated file (containing the file name,
package name, and project name)introspectedTable
- ibator's 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 |