|
||||||||||
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.RenameExampleClassPlugin
public class RenameExampleClassPlugin
This plugin demonstrates overriding the initialized() method to rename the generated example classes. Instead of xxxExample, the classes will be named xxxCriteria This plugin accepts two 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 | |
---|---|
RenameExampleClassPlugin()
|
Method Summary | |
---|---|
void |
initialized(IntrospectedTable introspectedTable)
This method is called just before the getGeneratedXXXFiles methods are called on the introspected table. |
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 RenameExampleClassPlugin()
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 void initialized(IntrospectedTable introspectedTable)
IbatorPlugin
A good example of overriding an attribute would be the case where a user wanted to change the name of one of the generated classes, change the target package, or change the name of the generated SQL map file.
Warning: Anything that is listed as an attribute should
not be changed by one of the other plugin methods. For example,
if you want to change the name of a generated example class, you
should not simply change the Type in the
modelExampleClassGenerated()
method. If you do, the
change will not be reflected in other generated artifacts.
initialized
in interface IbatorPlugin
initialized
in class IbatorPluginAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |