Class DisableDeletePlugin

java.lang.Object
org.mybatis.generator.api.PluginAdapter
org.mybatis.generator.plugins.dsql.DisableDeletePlugin
All Implemented Interfaces:
Plugin

public class DisableDeletePlugin extends PluginAdapter
Disables all delete methods in the MyBatis3DynamicSQL and MyBatis3Kotlin runtimes.
Author:
Jeff Butler
  • Constructor Details

    • DisableDeletePlugin

      public DisableDeletePlugin()
  • Method Details

    • validate

      public boolean validate(List<String> warnings)
      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
    • clientDeleteByPrimaryKeyMethodGenerated

      public boolean clientDeleteByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Description copied from interface: Plugin
      This method is called when the deleteByPrimaryKey method has been generated in the client interface.
      Parameters:
      method - the generated deleteByPrimaryKey method
      interfaze - 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.
    • clientDeleteByPrimaryKeyMethodGenerated

      public boolean clientDeleteByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientGeneralDeleteMethodGenerated

      public boolean clientGeneralDeleteMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Description copied from interface: Plugin
      Called when the general delete method has been generated. This is the replacement for deleteByExample in the MyBatis Dynamic SQL V2 runtime.
      Parameters:
      method - the generated general delete method
      interfaze - the partially generated mapper interfaces
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the method should be generated
    • clientGeneralDeleteMethodGenerated

      public boolean clientGeneralDeleteMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)