Class DisableUpdatePlugin
java.lang.Object
org.mybatis.generator.api.PluginAdapter
org.mybatis.generator.plugins.dsql.DisableUpdatePlugin
- All Implemented Interfaces:
Plugin
Disables all update methods in the MyBatis3DynamicSQL and MyBatis3Kotlin runtimes.
- Author:
- Jeff Butler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mybatis.generator.api.Plugin
Plugin.ModelClassType
-
Field Summary
Fields inherited from class org.mybatis.generator.api.PluginAdapter
context, properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
clientGeneralUpdateMethodGenerated
(Method method, Interface interfaze, IntrospectedTable introspectedTable) Called when the general update method has been generated.boolean
clientGeneralUpdateMethodGenerated
(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) boolean
clientUpdateAllColumnsMethodGenerated
(Method method, Interface interfaze, IntrospectedTable introspectedTable) Called when the updateAllColumns method is generated.boolean
clientUpdateAllColumnsMethodGenerated
(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) boolean
clientUpdateByPrimaryKeyMethodGenerated
(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) boolean
clientUpdateByPrimaryKeySelectiveMethodGenerated
(Method method, Interface interfaze, IntrospectedTable introspectedTable) This method is called when the updateByPrimaryKeySelective method has been generated in the client interface.boolean
clientUpdateByPrimaryKeySelectiveMethodGenerated
(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) boolean
clientUpdateByPrimaryKeyWithBLOBsMethodGenerated
(Method method, Interface interfaze, IntrospectedTable introspectedTable) This method is called when the updateByPrimaryKeyWithBLOBs method has been generated in the client interface.boolean
clientUpdateSelectiveColumnsMethodGenerated
(Method method, Interface interfaze, IntrospectedTable introspectedTable) Called when the updateSelectiveColumns method is generated.boolean
clientUpdateSelectiveColumnsMethodGenerated
(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) boolean
This method is called after all the setXXX methods are called, but before any other method is called.Methods inherited from class org.mybatis.generator.api.PluginAdapter
setContext, setProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mybatis.generator.api.Plugin
clientBasicCountMethodGenerated, clientBasicCountMethodGenerated, clientBasicDeleteMethodGenerated, clientBasicDeleteMethodGenerated, clientBasicInsertMethodGenerated, clientBasicInsertMethodGenerated, clientBasicInsertMultipleHelperMethodGenerated, clientBasicInsertMultipleHelperMethodGenerated, clientBasicInsertMultipleMethodGenerated, clientBasicInsertMultipleMethodGenerated, clientBasicSelectManyMethodGenerated, clientBasicSelectManyMethodGenerated, clientBasicSelectOneMethodGenerated, clientBasicSelectOneMethodGenerated, clientBasicUpdateMethodGenerated, clientBasicUpdateMethodGenerated, clientColumnListPropertyGenerated, clientCountByExampleMethodGenerated, clientDeleteByExampleMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientGeneralCountMethodGenerated, clientGeneralCountMethodGenerated, clientGeneralDeleteMethodGenerated, clientGeneralDeleteMethodGenerated, clientGeneralSelectDistinctMethodGenerated, clientGeneralSelectDistinctMethodGenerated, clientGeneralSelectMethodGenerated, clientGeneralSelectMethodGenerated, clientGenerated, clientInsertMethodGenerated, clientInsertMethodGenerated, clientInsertMultipleMethodGenerated, clientInsertMultipleMethodGenerated, clientInsertMultipleVarargMethodGenerated, clientInsertSelectiveMethodGenerated, clientInsertSelectiveMethodGenerated, clientSelectAllMethodGenerated, clientSelectByExampleWithBLOBsMethodGenerated, clientSelectByExampleWithoutBLOBsMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectListFieldGenerated, clientSelectOneMethodGenerated, clientSelectOneMethodGenerated, clientUpdateByExampleSelectiveMethodGenerated, clientUpdateByExampleWithBLOBsMethodGenerated, clientUpdateByExampleWithoutBLOBsMethodGenerated, clientUpdateByPrimaryKeyMethodGenerated, clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated, 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
-
DisableUpdatePlugin
public DisableUpdatePlugin()
-
-
Method Details
-
validate
Description copied from interface:Plugin
This 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
-
clientGeneralUpdateMethodGenerated
public boolean clientGeneralUpdateMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:Plugin
Called when the general update method has been generated. This is the replacement for updateByExample in the MyBatis Dynamic SQL V2 runtime.- Parameters:
method
- the generated general update 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
-
clientGeneralUpdateMethodGenerated
public boolean clientGeneralUpdateMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) -
clientUpdateByPrimaryKeyWithBLOBsMethodGenerated
public boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:Plugin
This method is called when the updateByPrimaryKeyWithBLOBs method has been generated in the client interface.- Parameters:
method
- the generated updateByPrimaryKeyWithBLOBs 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.
-
clientUpdateAllColumnsMethodGenerated
public boolean clientUpdateAllColumnsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:Plugin
Called when the updateAllColumns method is generated. The generated method can be used with the general update method to mimic the function of the old updateByExample method.- Parameters:
method
- the generated updateAllColumns 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
-
clientUpdateAllColumnsMethodGenerated
public boolean clientUpdateAllColumnsMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) -
clientUpdateSelectiveColumnsMethodGenerated
public boolean clientUpdateSelectiveColumnsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:Plugin
Called when the updateSelectiveColumns method is generated. The generated method can be used with the general update method to mimic the function of the old updateByExampleSelective method.- Parameters:
method
- the generated updateSelectiveColumns 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
-
clientUpdateSelectiveColumnsMethodGenerated
public boolean clientUpdateSelectiveColumnsMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) -
clientUpdateByPrimaryKeySelectiveMethodGenerated
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) Description copied from interface:Plugin
This method is called when the updateByPrimaryKeySelective method has been generated in the client interface.- Parameters:
method
- the generated updateByPrimaryKeySelective 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.
-
clientUpdateByPrimaryKeySelectiveMethodGenerated
public boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable) -
clientUpdateByPrimaryKeyMethodGenerated
public boolean clientUpdateByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
-