Interface Plugin

All Known Implementing Classes:
CacheNamespacePlugin, CachePlugin, CaseInsensitiveLikePlugin, CompositePlugin, DisableDeletePlugin, DisableInsertPlugin, DisableUpdatePlugin, EqualsHashCodePlugin, FluentBuilderMethodsPlugin, IgnoreViewsPlugin, MapperAnnotationPlugin, MapperConfigPlugin, PluginAdapter, PluginAggregator, ReadOnlyPlugin, RenameExampleClassPlugin, RowBoundsPlugin, SerializablePlugin, ToStringPlugin, UnmergeableXmlMappersPlugin, VirtualPrimaryKeyPlugin

public interface Plugin
This interface defines methods that will be called at different times during the code generation process. These methods can be used to extend or modify the generated code. Clients may implement this interface in its entirety, or extend the PluginAdapter (highly recommended).

Plugins have a lifecycle. In general, the lifecycle is this:

  1. The setXXX methods are called one time
  2. The validate method is called one time
  3. The initialized method is called for each introspected table
  4. The clientXXX methods are called for each introspected table
  5. The providerXXX methods are called for each introspected table
  6. The modelXXX methods are called for each introspected table
  7. The sqlMapXXX methods are called for each introspected table
  8. The contextGenerateAdditionalJavaFiles(IntrospectedTable) method is called for each introspected table
  9. The contextGenerateAdditionalXmlFiles(IntrospectedTable) method is called for each introspected table
  10. The contextGenerateAdditionalJavaFiles() method is called one time
  11. The contextGenerateAdditionalXmlFiles() method is called one time

Plugins are related to contexts - so each context will have its own set of plugins. If the same plugin is specified in multiple contexts, then each context will hold a unique instance of the plugin.

Plugins are called, and initialized, in the same order they are specified in the configuration.

The clientXXX, modelXXX, and sqlMapXXX methods are called by the code generators. If you replace the default code generators with other implementations, these methods may not be called.

Author:
Jeff Butler
See Also:
  • Method Details

    • setContext

      void setContext(Context context)
      Set the context under which this plugin is running.
      Parameters:
      context - the new context
    • setProperties

      void setProperties(Properties properties)
      Set properties from the plugin configuration.
      Parameters:
      properties - the new properties
    • initialized

      default void initialized(IntrospectedTable introspectedTable)
      This method is called just before the getGeneratedXXXFiles methods are called on the introspected table. Plugins can implement this method to override any of the default attributes, or change the results of database introspection, before any code generation activities occur. Attributes are listed as static Strings with the prefix ATTR_ in IntrospectedTable.

      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.

      Parameters:
      introspectedTable - the introspected table
    • validate

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

      default List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles()
      This method can be used to generate any additional Java file needed by your implementation. This method is called once, after all other Java files have been generated.
      Returns:
      a List of GeneratedJavaFiles - these files will be saved with the other files from this run.
    • contextGenerateAdditionalJavaFiles

      default List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles(IntrospectedTable introspectedTable)
      This method can be used to generate additional Java files needed by your implementation that might be related to a specific table. This method is called once for every table in the configuration.
      Parameters:
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      a List of GeneratedJavaFiles - these files will be saved with the other files from this run.
    • contextGenerateAdditionalKotlinFiles

      default List<GeneratedKotlinFile> contextGenerateAdditionalKotlinFiles()
    • contextGenerateAdditionalKotlinFiles

      default List<GeneratedKotlinFile> contextGenerateAdditionalKotlinFiles(IntrospectedTable introspectedTable)
    • contextGenerateAdditionalFiles

      default List<GeneratedFile> contextGenerateAdditionalFiles()
    • contextGenerateAdditionalFiles

      default List<GeneratedFile> contextGenerateAdditionalFiles(IntrospectedTable introspectedTable)
    • contextGenerateAdditionalXmlFiles

      default List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles()
      This method can be used to generate any additional XML file needed by your implementation. This method is called once, after all other XML files have been generated.
      Returns:
      a List of GeneratedXmlFiles - these files will be saved with the other files from this run.
    • contextGenerateAdditionalXmlFiles

      default List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles(IntrospectedTable introspectedTable)
      This method can be used to generate additional XML files needed by your implementation that might be related to a specific table. This method is called once for every table in the configuration.
      Parameters:
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      a List of GeneratedXmlFiles - these files will be saved with the other files from this run.
    • clientGenerated

      default boolean clientGenerated(Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the entire client has been generated. Implement this method to add additional methods or fields to a generated client interface or implementation.
      Parameters:
      interfaze - the generated interface if any, may be null
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the interface should be generated, false if the generated interface should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • clientBasicCountMethodGenerated

      @Deprecated default boolean clientBasicCountMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Deprecated.
      this method is no longer called
      This method is no longer called.
      Parameters:
      method - the generated count 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, 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.
    • clientBasicCountMethodGenerated

      @Deprecated default boolean clientBasicCountMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
      Deprecated.
      this method is no longer called
      This method is no longer called.
      Parameters:
      kotlinFunction - the generated function
      kotlinFile - the partially generated file
      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.
    • clientBasicDeleteMethodGenerated

      @Deprecated default boolean clientBasicDeleteMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Deprecated.
      No longer called
      This method is no longer called.
      Parameters:
      method - the generated 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, 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.
    • clientBasicDeleteMethodGenerated

      @Deprecated default boolean clientBasicDeleteMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
      Deprecated.
      No longer called
      This method is no longer called.
      Parameters:
      kotlinFunction - the generated delete function
      kotlinFile - the partially generated file
      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.
    • clientBasicInsertMethodGenerated

      default boolean clientBasicInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This 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 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, 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

      default boolean clientBasicInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
      This 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 function
      kotlinFile - the partially generated file
      introspectedTable - 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

      default boolean clientBasicInsertMultipleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This 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 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, 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

      default boolean clientBasicInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
      This 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 function
      kotlinFile - the partially generated file
      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 function should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • clientBasicInsertMultipleHelperMethodGenerated

      @Deprecated default boolean clientBasicInsertMultipleHelperMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Deprecated.
      this method is no longer called
      This method is no longer called.
      Parameters:
      method - the generated insert 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, 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.
    • clientBasicInsertMultipleHelperMethodGenerated

      @Deprecated default boolean clientBasicInsertMultipleHelperMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
      Deprecated.
      this method is no longer called
      Unused legacy method.
      Parameters:
      kotlinFunction - generated function
      kotlinFile - generated file
      introspectedTable - introspected table
      Returns:
      true
    • clientBasicSelectManyMethodGenerated

      default boolean clientBasicSelectManyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the selectMany method has been generated for the mapper interface. This method is only called in the MyBatis3DynamicSql runtime.
      Parameters:
      method - the generated selectMany 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, 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.
    • clientBasicSelectManyMethodGenerated

      default boolean clientBasicSelectManyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientBasicSelectOneMethodGenerated

      default boolean clientBasicSelectOneMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the selectOne method has been generated for the mapper interface. This method is only called in the MyBatis3DynamicSql runtime.
      Parameters:
      method - the generated selectOne 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, 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.
    • clientBasicSelectOneMethodGenerated

      default boolean clientBasicSelectOneMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientBasicUpdateMethodGenerated

      @Deprecated default boolean clientBasicUpdateMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Deprecated.
      no longer called
      This method is no longer called.
      Parameters:
      method - the generated update 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, 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.
    • clientBasicUpdateMethodGenerated

      @Deprecated default boolean clientBasicUpdateMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
      Deprecated.
      no longer called
      This method is no longer called.
      Parameters:
      kotlinFunction - the generated update function
      kotlinFile - the partially generated file
      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.
    • clientCountByExampleMethodGenerated

      default boolean clientCountByExampleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the countByExample method has been generated in the client interface.
      Parameters:
      method - the generated countByExample 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.
    • clientDeleteByExampleMethodGenerated

      default boolean clientDeleteByExampleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the deleteByExample method has been generated in the client interface.
      Parameters:
      method - the generated deleteByExample 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

      default boolean clientDeleteByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      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

      default boolean clientDeleteByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientGeneralCountMethodGenerated

      default boolean clientGeneralCountMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Called when the general count method has been generated. This is the replacement for countByExample in the MyBatis Dynamic SQL V2 runtime.
      Parameters:
      method - the generated general count 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
    • clientGeneralCountMethodGenerated

      default boolean clientGeneralCountMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientGeneralDeleteMethodGenerated

      default boolean clientGeneralDeleteMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      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

      default boolean clientGeneralDeleteMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientGeneralSelectDistinctMethodGenerated

      default boolean clientGeneralSelectDistinctMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Called when the general select distinct method has been generated. This is the replacement for selectDistinctByExample in the MyBatis Dynamic SQL V2 runtime.
      Parameters:
      method - the generated general select distinct 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
    • clientGeneralSelectDistinctMethodGenerated

      default boolean clientGeneralSelectDistinctMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientGeneralSelectMethodGenerated

      default boolean clientGeneralSelectMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Called when the general select method has been generated. This is the replacement for selectByExample in the MyBatis Dynamic SQL V2 runtime.
      Parameters:
      method - the generated general select 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
    • clientGeneralSelectMethodGenerated

      default boolean clientGeneralSelectMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientGeneralUpdateMethodGenerated

      default boolean clientGeneralUpdateMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      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 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
    • clientGeneralUpdateMethodGenerated

      default boolean clientGeneralUpdateMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientInsertMethodGenerated

      default boolean clientInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the insert method has been generated in the client interface.
      Parameters:
      method - the generated insert 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.
    • clientInsertMethodGenerated

      default boolean clientInsertMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientInsertMultipleMethodGenerated

      default boolean clientInsertMultipleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This 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 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.
    • clientInsertMultipleMethodGenerated

      default boolean clientInsertMultipleMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientInsertSelectiveMethodGenerated

      default boolean clientInsertSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the insert selective method has been generated in the client interface.
      Parameters:
      method - the generated insert 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.
    • clientInsertSelectiveMethodGenerated

      default boolean clientInsertSelectiveMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientSelectByExampleWithBLOBsMethodGenerated

      default boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the selectByExampleWithBLOBs method has been generated in the client interface.
      Parameters:
      method - the generated selectByExampleWithBLOBs 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.
    • clientSelectByExampleWithoutBLOBsMethodGenerated

      default boolean clientSelectByExampleWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the selectByExampleWithoutBLOBs method has been generated in the client interface.
      Parameters:
      method - the generated selectByExampleWithoutBLOBs 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.
    • clientSelectByPrimaryKeyMethodGenerated

      default boolean clientSelectByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the selectByPrimaryKey method has been generated in the client interface.
      Parameters:
      method - the generated selectByPrimaryKey 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.
    • clientSelectByPrimaryKeyMethodGenerated

      default boolean clientSelectByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientSelectListFieldGenerated

      default boolean clientSelectListFieldGenerated(Field field, Interface interfaze, IntrospectedTable introspectedTable)
      Called when the selectList field is generated in a MyBatis Dynamic SQL V2 runtime.
      Parameters:
      field - the generated selectList field
      interfaze - the partially generated mapper interfaces
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the field should be generated
    • clientSelectOneMethodGenerated

      default boolean clientSelectOneMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      Called when the selectOne method is generated. This is a new method in the MyBatis Dynamic SQL V2 runtime.
      Parameters:
      method - the generated selectOne 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
    • clientSelectOneMethodGenerated

      default boolean clientSelectOneMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientUpdateByExampleSelectiveMethodGenerated

      default boolean clientUpdateByExampleSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleSelective method has been generated in the client interface.
      Parameters:
      method - the generated updateByExampleSelective 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.
    • clientUpdateAllColumnsMethodGenerated

      default boolean clientUpdateAllColumnsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      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 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
    • clientUpdateAllColumnsMethodGenerated

      default boolean clientUpdateAllColumnsMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientUpdateSelectiveColumnsMethodGenerated

      default boolean clientUpdateSelectiveColumnsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      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 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
    • clientUpdateSelectiveColumnsMethodGenerated

      default boolean clientUpdateSelectiveColumnsMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientUpdateByExampleWithBLOBsMethodGenerated

      default boolean clientUpdateByExampleWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleWithBLOBs method has been generated in the client interface.
      Parameters:
      method - the generated updateByExampleWithBLOBs 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.
    • clientUpdateByExampleWithoutBLOBsMethodGenerated

      default boolean clientUpdateByExampleWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleWithoutBLOBs method has been generated in the client interface.
      Parameters:
      method - the generated updateByExampleWithoutBLOBs 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.
    • clientUpdateByPrimaryKeySelectiveMethodGenerated

      default boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the updateByPrimaryKeySelective method has been generated in the client interface.
      Parameters:
      method - the generated updateByPrimaryKeySelective 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.
    • clientUpdateByPrimaryKeySelectiveMethodGenerated

      default boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientUpdateByPrimaryKeyWithBLOBsMethodGenerated

      default boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the updateByPrimaryKeyWithBLOBs method has been generated in the client interface.
      Parameters:
      method - the generated updateByPrimaryKeyWithBLOBs 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.
    • clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated

      default boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the updateByPrimaryKeyWithoutBLOBs method has been generated in the client interface.
      Parameters:
      method - the generated updateByPrimaryKeyWithoutBLOBs 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.
    • clientSelectAllMethodGenerated

      default boolean clientSelectAllMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      This method is called when the selectAll method has been generated in the client interface. This method is only generated by the simple runtime.
      Parameters:
      method - the generated selectAll 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.
    • modelFieldGenerated

      default boolean modelFieldGenerated(Field field, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType)
      This method is called after the field is generated for a specific column in a table.
      Parameters:
      field - the field generated for the specified column
      topLevelClass - the partially implemented model class. You can add additional imported classes to the implementation class if necessary.
      introspectedColumn - The class containing information about the column related to this field as introspected from the database
      introspectedTable - The class containing information about the table as introspected from the database
      modelClassType - the type of class that the field is generated for
      Returns:
      true if the field should be generated, false if the generated field should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • modelGetterMethodGenerated

      default boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType)
      This method is called after the getter, or accessor, method is generated for a specific column in a table.
      Parameters:
      method - the getter, or accessor, method generated for the specified column
      topLevelClass - the partially implemented model class. You can add additional imported classes to the implementation class if necessary.
      introspectedColumn - The class containing information about the column related to this field as introspected from the database
      introspectedTable - The class containing information about the table as introspected from the database
      modelClassType - the type of class that the field is generated for
      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.
    • modelSetterMethodGenerated

      default boolean modelSetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, Plugin.ModelClassType modelClassType)
      This method is called after the setter, or mutator, method is generated for a specific column in a table.
      Parameters:
      method - the setter, or mutator, method generated for the specified column
      topLevelClass - the partially implemented model class. You can add additional imported classes to the implementation class if necessary.
      introspectedColumn - The class containing information about the column related to this field as introspected from the database
      introspectedTable - The class containing information about the table as introspected from the database
      modelClassType - the type of class that the field is generated for
      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.
    • modelPrimaryKeyClassGenerated

      default boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called after the primary key class is generated by the JavaModelGenerator. This method will only be called if the table rules call for generation of a primary key class.

      This method is only guaranteed to be called by the Java model generators. Other user supplied generators may, or may not, call this method.
      Parameters:
      topLevelClass - the generated primary key class
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the class should be generated, false if the generated class should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • modelBaseRecordClassGenerated

      default boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called after the base record class is generated by the JavaModelGenerator. This method will only be called if the table rules call for generation of a base record class.

      This method is only guaranteed to be called by the default Java model generators. Other user supplied generators may, or may not, call this method.
      Parameters:
      topLevelClass - the generated base record class
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the class should be generated, false if the generated class should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • modelRecordWithBLOBsClassGenerated

      default boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called after the record with BLOBs class is generated by the JavaModelGenerator. This method will only be called if the table rules call for generation of a record with BLOBs class.

      This method is only guaranteed to be called by the default Java model generators. Other user supplied generators may, or may not, call this method.
      Parameters:
      topLevelClass - the generated record with BLOBs class
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the class should be generated, false if the generated class should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • modelExampleClassGenerated

      default boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called after the example class is generated by the JavaModelGenerator. This method will only be called if the table rules call for generation of an example class.

      This method is only guaranteed to be called by the default Java model generators. Other user supplied generators may, or may not, call this method.
      Parameters:
      topLevelClass - the generated example class
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the class should be generated, false if the generated class should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapGenerated

      default boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable)
      This method is called when the SqlMap file has been generated.
      Parameters:
      sqlMap - the generated file (containing the file name, package name, and project name)
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the sqlMap should be generated, false if the generated sqlMap should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapDocumentGenerated

      default boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable)
      This method is called when the SqlMap document has been generated. This method can be used to add additional XML elements the the generated document.
      Parameters:
      document - the generated document (note that this is the MyBatis generator's internal Document class - not the w3c XML Document class)
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the document should be generated, false if the generated document should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins. Also, if any plugin returns false, then the sqlMapGenerated method will not be called.
    • sqlMapResultMapWithoutBLOBsElementGenerated

      default boolean sqlMapResultMapWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the base resultMap is generated.
      Parameters:
      element - the generated <resultMap> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapCountByExampleElementGenerated

      default boolean sqlMapCountByExampleElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the countByExample element is generated.
      Parameters:
      element - the generated <select> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapDeleteByExampleElementGenerated

      default boolean sqlMapDeleteByExampleElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the deleteByExample element is generated.
      Parameters:
      element - the generated <delete> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapDeleteByPrimaryKeyElementGenerated

      default boolean sqlMapDeleteByPrimaryKeyElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the deleteByPrimaryKey element is generated.
      Parameters:
      element - the generated <delete> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapExampleWhereClauseElementGenerated

      default boolean sqlMapExampleWhereClauseElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the exampleWhereClause element is generated.
      Parameters:
      element - the generated <sql> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapBaseColumnListElementGenerated

      default boolean sqlMapBaseColumnListElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the baseColumnList element is generated.
      Parameters:
      element - the generated <sql> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapBlobColumnListElementGenerated

      default boolean sqlMapBlobColumnListElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the blobColumnList element is generated.
      Parameters:
      element - the generated <sql> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapInsertElementGenerated

      default boolean sqlMapInsertElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the insert element is generated.
      Parameters:
      element - the generated <insert> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapInsertSelectiveElementGenerated

      default boolean sqlMapInsertSelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the insert selective element is generated.
      Parameters:
      element - the generated <insert> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapResultMapWithBLOBsElementGenerated

      default boolean sqlMapResultMapWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the resultMap with BLOBs element is generated - this resultMap will extend the base resultMap.
      Parameters:
      element - the generated <resultMap> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapSelectAllElementGenerated

      default boolean sqlMapSelectAllElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the selectAll element is generated.
      Parameters:
      element - the generated <select> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapSelectByPrimaryKeyElementGenerated

      default boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the selectByPrimaryKey element is generated.
      Parameters:
      element - the generated <select> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapSelectByExampleWithoutBLOBsElementGenerated

      default boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the selectByExample element is generated.
      Parameters:
      element - the generated <select> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapSelectByExampleWithBLOBsElementGenerated

      default boolean sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the selectByExampleWithBLOBs element is generated.
      Parameters:
      element - the generated <select> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapUpdateByExampleSelectiveElementGenerated

      default boolean sqlMapUpdateByExampleSelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleSelective element is generated.
      Parameters:
      element - the generated <update> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapUpdateByExampleWithBLOBsElementGenerated

      default boolean sqlMapUpdateByExampleWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleWithBLOBs element is generated.
      Parameters:
      element - the generated <update> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapUpdateByExampleWithoutBLOBsElementGenerated

      default boolean sqlMapUpdateByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleWithourBLOBs element is generated.
      Parameters:
      element - the generated <update> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapUpdateByPrimaryKeySelectiveElementGenerated

      default boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the updateByPrimaryKeySelective element is generated.
      Parameters:
      element - the generated <update> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated

      default boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the updateByPrimaryKeyWithBLOBs element is generated.
      Parameters:
      element - the generated <update> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated

      default boolean sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
      This method is called when the updateByPrimaryKeyWithoutBLOBs element is generated.
      Parameters:
      element - the generated <update> element
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the element should be generated, false if the generated element should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • providerGenerated

      default boolean providerGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the SQL provider has been generated. Implement this method to add additional methods or fields to a generated SQL provider.
      Parameters:
      topLevelClass - the generated provider
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the provider should be generated, false if the generated provider should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • providerApplyWhereMethodGenerated

      default boolean providerApplyWhereMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the applyWhere method has been generated in the SQL provider.
      Parameters:
      method - the generated applyWhere method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerCountByExampleMethodGenerated

      default boolean providerCountByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the countByExample method has been generated in the SQL provider.
      Parameters:
      method - the generated countByExample method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerDeleteByExampleMethodGenerated

      default boolean providerDeleteByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the deleteByExample method has been generated in the SQL provider.
      Parameters:
      method - the generated deleteByExample method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerInsertSelectiveMethodGenerated

      default boolean providerInsertSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the insertSelective method has been generated in the SQL provider.
      Parameters:
      method - the generated insertSelective method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerSelectByExampleWithBLOBsMethodGenerated

      default boolean providerSelectByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the selectByExampleWithBLOBs method has been generated in the SQL provider.
      Parameters:
      method - the generated selectByExampleWithBLOBs method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerSelectByExampleWithoutBLOBsMethodGenerated

      default boolean providerSelectByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the selectByExampleWithoutBLOBs method has been generated in the SQL provider.
      Parameters:
      method - the generated selectByExampleWithoutBLOBs method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerUpdateByExampleSelectiveMethodGenerated

      default boolean providerUpdateByExampleSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleSelective method has been generated in the SQL provider.
      Parameters:
      method - the generated updateByExampleSelective method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerUpdateByExampleWithBLOBsMethodGenerated

      default boolean providerUpdateByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleWithBLOBs method has been generated in the SQL provider.
      Parameters:
      method - the generated updateByExampleWithBLOBs method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerUpdateByExampleWithoutBLOBsMethodGenerated

      default boolean providerUpdateByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the updateByExampleWithoutBLOBs method has been generated in the SQL provider.
      Parameters:
      method - the generated updateByExampleWithoutBLOBs method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • providerUpdateByPrimaryKeySelectiveMethodGenerated

      default boolean providerUpdateByPrimaryKeySelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
      This method is called when the updateByPrimaryKeySelective method has been generated in the SQL provider.
      Parameters:
      method - the generated updateByPrimaryKeySelective method
      topLevelClass - the partially generated provider class You can add additional imported classes to the class 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.
    • dynamicSqlSupportGenerated

      default boolean dynamicSqlSupportGenerated(TopLevelClass supportClass, IntrospectedTable introspectedTable)
      This method is called when the MyBatis Dynamic SQL support class has been generated in the MyBatis Dynamic SQL runtime.
      Parameters:
      supportClass - the generated MyBatis Dynamic SQL support class You can add additional items to the generated class if necessary.
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the class should be generated, false if the generated class should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • dynamicSqlSupportGenerated

      default boolean dynamicSqlSupportGenerated(KotlinFile kotlinFile, KotlinType outerSupportObject, KotlinType innerSupportClass, IntrospectedTable introspectedTable)
      This method is called when the MyBatis Dynamic SQL support object has been generated. The format of the class is an outer object with an inner class. The inner class contains the table and column definitions. The outer (singleton) object contains a reference to an instance of the inner class, and shortcut properties that reference the columns of that instance.
      Parameters:
      kotlinFile - the generated Kotlin file containing the outer object and inner class
      outerSupportObject - a reference to the outer object in the file
      innerSupportClass - a reference to the inner class
      introspectedTable - the class containing information about the table as introspected from the database
      Returns:
      true if the generated file should be kept
    • mapperExtensionsGenerated

      @Deprecated default boolean mapperExtensionsGenerated(KotlinFile extensionsFile, IntrospectedTable introspectedTable)
      Deprecated.
      this method is no longer called
      This method is no longer called.
      Parameters:
      extensionsFile - the partially generated file
      introspectedTable - The class containing information about the table as introspected from the database
      Returns:
      true if the file should be generated, false if the generated file should be ignored. In the case of multiple plugins, the first plugin returning false will disable the calling of further plugins.
    • mapperGenerated

      default boolean mapperGenerated(KotlinFile mapperFile, KotlinType mapper, IntrospectedTable introspectedTable)
    • kotlinDataClassGenerated

      default boolean kotlinDataClassGenerated(KotlinFile kotlinFile, KotlinType dataClass, IntrospectedTable introspectedTable)
    • clientColumnListPropertyGenerated

      default boolean clientColumnListPropertyGenerated(KotlinProperty kotlinProperty, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientInsertMultipleVarargMethodGenerated

      default boolean clientInsertMultipleVarargMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • clientUpdateByPrimaryKeyMethodGenerated

      default boolean clientUpdateByPrimaryKeyMethodGenerated(KotlinFunction kotlinFunction, KotlinFile kotlinFile, IntrospectedTable introspectedTable)
    • shouldGenerate

      default boolean shouldGenerate(IntrospectedTable introspectedTable)
      If false, the table will be skipped in code generation.
      Parameters:
      introspectedTable - the current table
      Returns:
      true if code should be generated for this table, else false
    • clientUpdateByPrimaryKeyMethodGenerated

      default boolean clientUpdateByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
      The motivation for adding this method can be found in https://github.com/mybatis/generator/issues/1116 This method is called when the updateByPrimaryKey method has been generated in the dynamic SQL runtime client interface.
      Parameters:
      method - the generated updateByPrimaryKey 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.