Class DisableInsertPlugin
java.lang.Object
org.mybatis.generator.api.PluginAdapter
org.mybatis.generator.plugins.dsql.DisableInsertPlugin
- All Implemented Interfaces:
Plugin
Disables all insert methods in the MyBatis3DynamicSQL and MyBatis3Kotlin runtimes.
- Author:
- Jeff Butler
-
Nested Class Summary
Nested classes/interfaces inherited from interface Plugin
Plugin.ModelClassType -
Field Summary
Fields inherited from class PluginAdapter
context, properties -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanclientBasicInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) This method is called when the insert method has been generated for the mapper interface.booleanclientBasicInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) This method is called when the insert function has been generated for the mapper interface.booleanclientBasicInsertMultipleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) This method is called when the insert multiple method has been generated for the mapper interface.booleanclientBasicInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) This method is called when the insert multiple method has been generated for the mapper interface.booleanclientInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) This method is called when the insert method has been generated in the client interface.booleanclientInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) booleanclientInsertMultipleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) This method is called when the insert multiple method has been generated in the client interface.booleanclientInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) booleanclientInsertMultipleVarargMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) booleanclientInsertSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) This method is called when the insert selective method has been generated in the client interface.booleanclientInsertSelectiveMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) booleanThis method is called after all the setXXX methods are called, but before any other method is called.Methods inherited from class PluginAdapter
setContext, setPropertiesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Plugin
clientBasicCountMethodGenerated, clientBasicCountMethodGenerated, clientBasicDeleteMethodGenerated, clientBasicDeleteMethodGenerated, clientBasicInsertMultipleHelperMethodGenerated, clientBasicInsertMultipleHelperMethodGenerated, clientBasicSelectManyMethodGenerated, clientBasicSelectManyMethodGenerated, clientBasicSelectOneMethodGenerated, clientBasicSelectOneMethodGenerated, clientBasicUpdateMethodGenerated, clientBasicUpdateMethodGenerated, clientColumnListPropertyGenerated, clientCountByExampleMethodGenerated, clientDeleteByExampleMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientGeneralCountMethodGenerated, clientGeneralCountMethodGenerated, clientGeneralDeleteMethodGenerated, clientGeneralDeleteMethodGenerated, clientGeneralSelectDistinctMethodGenerated, clientGeneralSelectDistinctMethodGenerated, clientGeneralSelectMethodGenerated, clientGeneralSelectMethodGenerated, clientGeneralUpdateMethodGenerated, clientGeneralUpdateMethodGenerated, clientGenerated, clientSelectAllMethodGenerated, clientSelectByExampleWithBLOBsMethodGenerated, clientSelectByExampleWithoutBLOBsMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectListFieldGenerated, clientSelectOneMethodGenerated, clientSelectOneMethodGenerated, clientUpdateAllColumnsMethodGenerated, clientUpdateAllColumnsMethodGenerated, clientUpdateByExampleSelectiveMethodGenerated, clientUpdateByExampleWithBLOBsMethodGenerated, clientUpdateByExampleWithoutBLOBsMethodGenerated, clientUpdateByPrimaryKeyMethodGenerated, clientUpdateByPrimaryKeyMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeyWithBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated, clientUpdateSelectiveColumnsMethodGenerated, clientUpdateSelectiveColumnsMethodGenerated, contextGenerateAdditionalFiles, contextGenerateAdditionalFiles, contextGenerateAdditionalJavaFiles, contextGenerateAdditionalJavaFiles, contextGenerateAdditionalKotlinFiles, contextGenerateAdditionalKotlinFiles, contextGenerateAdditionalXmlFiles, contextGenerateAdditionalXmlFiles, dynamicSqlSupportGenerated, dynamicSqlSupportGenerated, initialized, kotlinDataClassGenerated, mapperExtensionsGenerated, mapperGenerated, modelBaseRecordClassGenerated, modelExampleClassGenerated, modelFieldGenerated, modelGetterMethodGenerated, modelPrimaryKeyClassGenerated, modelRecordWithBLOBsClassGenerated, modelSetterMethodGenerated, providerApplyWhereMethodGenerated, providerCountByExampleMethodGenerated, providerDeleteByExampleMethodGenerated, providerGenerated, providerInsertSelectiveMethodGenerated, providerSelectByExampleWithBLOBsMethodGenerated, providerSelectByExampleWithoutBLOBsMethodGenerated, providerUpdateByExampleSelectiveMethodGenerated, providerUpdateByExampleWithBLOBsMethodGenerated, providerUpdateByExampleWithoutBLOBsMethodGenerated, providerUpdateByPrimaryKeySelectiveMethodGenerated, shouldGenerate, sqlMapBaseColumnListElementGenerated, sqlMapBlobColumnListElementGenerated, sqlMapCountByExampleElementGenerated, sqlMapDeleteByExampleElementGenerated, sqlMapDeleteByPrimaryKeyElementGenerated, sqlMapDocumentGenerated, sqlMapExampleWhereClauseElementGenerated, sqlMapGenerated, sqlMapInsertElementGenerated, sqlMapInsertSelectiveElementGenerated, sqlMapResultMapWithBLOBsElementGenerated, sqlMapResultMapWithoutBLOBsElementGenerated, sqlMapSelectAllElementGenerated, sqlMapSelectByExampleWithBLOBsElementGenerated, sqlMapSelectByExampleWithoutBLOBsElementGenerated, sqlMapSelectByPrimaryKeyElementGenerated, sqlMapUpdateByExampleSelectiveElementGenerated, sqlMapUpdateByExampleWithBLOBsElementGenerated, sqlMapUpdateByExampleWithoutBLOBsElementGenerated, sqlMapUpdateByPrimaryKeySelectiveElementGenerated, sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated, sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated
-
Constructor Details
-
DisableInsertPlugin
public DisableInsertPlugin()
-
-
Method Details
-
validate
Description copied from interface:PluginThis method is called after all the setXXX methods are called, but before any other method is called. This allows the plugin to determine whether it can run or not. For example, if the plugin requires certain properties to be set, and the properties are not set, then the plugin is invalid and will not run.- Parameters:
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.- Returns:
- true if the plugin is in a valid state. Invalid plugins will not be called
-
clientBasicInsertMethodGenerated
public boolean clientBasicInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:PluginThis method is called when the insert method has been generated for the mapper interface. This method is only called in the MyBatis3DynamicSql runtime. This method is only called if the table has generated keys.- Parameters:
method- the generated insert methodinterfaze- the partially generated mapper interfacesintrospectedTable- The class containing information about the table as introspected from the database- Returns:
- true if the method should be generated, false if the generated method should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
-
clientBasicInsertMethodGenerated
public boolean clientBasicInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) Description copied from interface:PluginThis method is called when the insert function has been generated for the mapper interface. This method is only called in the MyBatis3Kotlin runtime. This method is only called if the table has generated keys.- Parameters:
kotlinFunction- the generated insert functionkotlinFile- the partially generated fileintrospectedTable- The class containing information about the table as introspected from the database- Returns:
- true if the function should be generated, false if the generated function should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
-
clientBasicInsertMultipleMethodGenerated
public boolean clientBasicInsertMultipleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:PluginThis method is called when the insert multiple method has been generated for the mapper interface. This method is only called in the MyBatis3DynamicSql runtime. This method is only called if the table has generated keys.- Parameters:
method- the generated insert methodinterfaze- the partially generated mapper interfacesintrospectedTable- The class containing information about the table as introspected from the database- Returns:
- true if the method should be generated, false if the generated method should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
-
clientBasicInsertMultipleMethodGenerated
public boolean clientBasicInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) Description copied from interface:PluginThis method is called when the insert multiple method has been generated for the mapper interface. This method is only called in the MyBatis3DynamicSql runtime. This method is only called if the table has generated keys.- Parameters:
kotlinFunction- the generated insert functionkotlinFile- the partially generated fileintrospectedTable- The class containing information about the table as introspected from the database- Returns:
- true if the method should be generated, false if the generated function should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
-
clientInsertMethodGenerated
public boolean clientInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:PluginThis method is called when the insert method has been generated in the client interface.- Parameters:
method- the generated insert methodinterfaze- the partially implemented client interface. You can add additional imported classes to the interface if necessary.introspectedTable- The class containing information about the table as introspected from the database- Returns:
- true if the method should be generated, false if the generated method should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
-
clientInsertMethodGenerated
public boolean clientInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) -
clientInsertMultipleMethodGenerated
public boolean clientInsertMultipleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:PluginThis method is called when the insert multiple method has been generated in the client interface. This method is only called in the MyBatis3DynamicSql runtime.- Parameters:
method- the generated insert multiple methodinterfaze- the partially implemented client interface. You can add additional imported classes to the interface if necessary.introspectedTable- The class containing information about the table as introspected from the database- Returns:
- true if the method should be generated, false if the generated method should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
-
clientInsertMultipleMethodGenerated
public boolean clientInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) -
clientInsertSelectiveMethodGenerated
public boolean clientInsertSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:PluginThis method is called when the insert selective method has been generated in the client interface.- Parameters:
method- the generated insert methodinterfaze- the partially implemented client interface. You can add additional imported classes to the interface if necessary.introspectedTable- The class containing information about the table as introspected from the database- Returns:
- true if the method should be generated, false if the generated method should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
-
clientInsertSelectiveMethodGenerated
public boolean clientInsertSelectiveMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) -
clientInsertMultipleVarargMethodGenerated
public boolean clientInsertMultipleVarargMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
-