(empty log message)
@@ -0,0 +1,22 @@ | ||
1 | +import java.util.List; | |
2 | + | |
3 | +import org.mybatis.generator.api.IntrospectedTable; | |
4 | +import org.mybatis.generator.api.PluginAdapter; | |
5 | + | |
6 | +/** | |
7 | + * Rename Entity Class name | |
8 | + */ | |
9 | +public class AddSuffixEntityPlugin extends PluginAdapter { | |
10 | + | |
11 | + @Override | |
12 | + public boolean validate(List<String> warnings) { | |
13 | + return true; | |
14 | + } | |
15 | + | |
16 | + @Override | |
17 | + public void initialized(IntrospectedTable table) { | |
18 | + super.initialized(table); | |
19 | + String name = table.getBaseRecordType(); | |
20 | + table.setBaseRecordType(name + "Entity"); | |
21 | + } | |
22 | +} | |
\ No newline at end of file |