public class VirtualPrimaryKeyPlugin extends PluginAdapter
Plugin.ModelClassType
context, properties
Constructor and Description |
---|
VirtualPrimaryKeyPlugin() |
Modifier and Type | Method and Description |
---|---|
void |
initialized(IntrospectedTable introspectedTable)
This method is called just before the getGeneratedXXXFiles methods are
called on the introspected table.
|
boolean |
validate(List<String> warnings)
This method is called after all the setXXX methods are called, but before
any other method is called.
|
clientCountByExampleMethodGenerated, clientCountByExampleMethodGenerated, clientDeleteByExampleMethodGenerated, clientDeleteByExampleMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientGenerated, clientInsertMethodGenerated, clientInsertMethodGenerated, clientInsertSelectiveMethodGenerated, clientInsertSelectiveMethodGenerated, clientSelectAllMethodGenerated, clientSelectAllMethodGenerated, clientSelectByExampleWithBLOBsMethodGenerated, clientSelectByExampleWithBLOBsMethodGenerated, clientSelectByExampleWithoutBLOBsMethodGenerated, clientSelectByExampleWithoutBLOBsMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientUpdateByExampleSelectiveMethodGenerated, clientUpdateByExampleSelectiveMethodGenerated, clientUpdateByExampleWithBLOBsMethodGenerated, clientUpdateByExampleWithBLOBsMethodGenerated, clientUpdateByExampleWithoutBLOBsMethodGenerated, clientUpdateByExampleWithoutBLOBsMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeyWithBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated, contextGenerateAdditionalJavaFiles, contextGenerateAdditionalJavaFiles, contextGenerateAdditionalXmlFiles, contextGenerateAdditionalXmlFiles, getContext, getProperties, modelBaseRecordClassGenerated, modelExampleClassGenerated, modelFieldGenerated, modelGetterMethodGenerated, modelPrimaryKeyClassGenerated, modelRecordWithBLOBsClassGenerated, modelSetterMethodGenerated, providerApplyWhereMethodGenerated, providerCountByExampleMethodGenerated, providerDeleteByExampleMethodGenerated, providerGenerated, providerInsertSelectiveMethodGenerated, providerSelectByExampleWithBLOBsMethodGenerated, providerSelectByExampleWithoutBLOBsMethodGenerated, providerUpdateByExampleSelectiveMethodGenerated, providerUpdateByExampleWithBLOBsMethodGenerated, providerUpdateByExampleWithoutBLOBsMethodGenerated, providerUpdateByPrimaryKeySelectiveMethodGenerated, setContext, setProperties, sqlMapBaseColumnListElementGenerated, sqlMapBlobColumnListElementGenerated, sqlMapCountByExampleElementGenerated, sqlMapDeleteByExampleElementGenerated, sqlMapDeleteByPrimaryKeyElementGenerated, sqlMapDocumentGenerated, sqlMapExampleWhereClauseElementGenerated, sqlMapGenerated, sqlMapInsertElementGenerated, sqlMapInsertSelectiveElementGenerated, sqlMapResultMapWithBLOBsElementGenerated, sqlMapResultMapWithoutBLOBsElementGenerated, sqlMapSelectAllElementGenerated, sqlMapSelectByExampleWithBLOBsElementGenerated, sqlMapSelectByExampleWithoutBLOBsElementGenerated, sqlMapSelectByPrimaryKeyElementGenerated, sqlMapUpdateByExampleSelectiveElementGenerated, sqlMapUpdateByExampleWithBLOBsElementGenerated, sqlMapUpdateByExampleWithoutBLOBsElementGenerated, sqlMapUpdateByPrimaryKeySelectiveElementGenerated, sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated, sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated
public boolean validate(List<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 void initialized(IntrospectedTable introspectedTable)
Plugin
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 Plugin
initialized
in class PluginAdapter
Copyright © 2010–2018 MyBatis.org. All rights reserved.