public interface

Plugin

org.mybatis.generator.api.Plugin
Known Indirect Subclasses

Class Overview

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.

See Also

Summary

Nested Classes
enum Plugin.ModelClassType  
Public Methods
abstract boolean clientCountByExampleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the countByExample method has been generated in the client interface.
abstract boolean clientCountByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the countByExample method has been generated in the client implementation class.
abstract boolean clientDeleteByExampleMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the deleteByExample method has been generated in the client interface.
abstract boolean clientDeleteByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the deleteByExample method has been generated in the client implementation class.
abstract boolean clientDeleteByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the deleteByPrimaryKey method has been generated in the client interface.
abstract boolean clientDeleteByPrimaryKeyMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the deleteByPrimaryKey method has been generated in the client implementation class.
abstract boolean clientGenerated(Interface interfaze, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the entire client has been generated.
abstract boolean clientInsertMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the insert method has been generated in the client interface.
abstract boolean clientInsertMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the insert method has been generated in the client implementation class.
abstract boolean clientInsertSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the insert selective method has been generated in the client interface.
abstract boolean clientInsertSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the insert selective method has been generated in the client implementation class.
abstract boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the selectByExampleWithBLOBs method has been generated in the client interface.
abstract boolean clientSelectByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the selectByExampleWithBLOBs method has been generated in the client implementation class.
abstract boolean clientSelectByExampleWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the selectByExampleWithoutBLOBs method has been generated in the client interface.
abstract boolean clientSelectByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the selectByExampleWithoutBLOBs method has been generated in the client implementation class.
abstract boolean clientSelectByPrimaryKeyMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the selectByPrimaryKey method has been generated in the client interface.
abstract boolean clientSelectByPrimaryKeyMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the selectByPrimaryKey method has been generated in the client implementation class.
abstract boolean clientUpdateByExampleSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the updateByExampleSelective method has been generated in the client interface.
abstract boolean clientUpdateByExampleSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByExampleSelective method has been generated in the client implementation class.
abstract boolean clientUpdateByExampleWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithBLOBs method has been generated in the client interface.
abstract boolean clientUpdateByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithBLOBs method has been generated in the client implementation class.
abstract boolean clientUpdateByExampleWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithoutBLOBs method has been generated in the client interface.
abstract boolean clientUpdateByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithoutBLOBs method has been generated in the client implementation class.
abstract boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeySelective method has been generated in the client interface.
abstract boolean clientUpdateByPrimaryKeySelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeySelective method has been generated in the client implementation class.
abstract boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeyWithBLOBs method has been generated in the client interface.
abstract boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeyWithBLOBs method has been generated in the client implementation class.
abstract boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeyWithoutBLOBs method has been generated in the client interface.
abstract boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeyWithoutBLOBs method has been generated in the client implementation class.
abstract List<GeneratedJavaFile> contextGenerateAdditionalJavaFiles()
This method can be used to generate any additional Java file needed by your implementation.
abstract 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.
abstract List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles()
This method can be used to generate any additional XML file needed by your implementation.
abstract 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.
abstract void initialized(IntrospectedTable introspectedTable)
This method is called just before the getGeneratedXXXFiles methods are called on the introspected table.
abstract boolean modelBaseRecordClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called after the base record class is generated by the JavaModelGenerator.
abstract boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called after the example class is generated by the JavaModelGenerator.
abstract 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.
abstract 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.
abstract boolean modelPrimaryKeyClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called after the primary key class is generated by the JavaModelGenerator.
abstract boolean modelRecordWithBLOBsClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called after the record with BLOBs class is generated by the JavaModelGenerator.
abstract 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.
abstract boolean providerApplyWhereMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the applyWhere method has been generated in the SQL provider.
abstract boolean providerCountByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the countByExample method has been generated in the SQL provider.
abstract boolean providerDeleteByExampleMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the deleteByExample method has been generated in the SQL provider.
abstract boolean providerGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the SQL provider has been generated.
abstract boolean providerInsertSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the insertSelective method has been generated in the SQL provider.
abstract boolean providerSelectByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the selectByExampleWithBLOBs method has been generated in the SQL provider.
abstract boolean providerSelectByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the selectByExampleWithoutBLOBs method has been generated in the SQL provider.
abstract boolean providerUpdateByExampleSelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByExampleSelective method has been generated in the SQL provider.
abstract boolean providerUpdateByExampleWithBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithBLOBs method has been generated in the SQL provider.
abstract boolean providerUpdateByExampleWithoutBLOBsMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithoutBLOBs method has been generated in the SQL provider.
abstract boolean providerUpdateByPrimaryKeySelectiveMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeySelective method has been generated in the SQL provider.
abstract void setContext(Context context)
Set the context under which this plugin is running
abstract void setProperties(Properties properties)
Set properties from the plugin configuration
abstract boolean sqlMapBaseColumnListElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the baseColumnList element is generated.
abstract boolean sqlMapBlobColumnListElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the blobColumnList element is generated.
abstract boolean sqlMapCountByExampleElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the countByExample element is generated.
abstract boolean sqlMapDeleteByExampleElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the deleteByExample element is generated.
abstract boolean sqlMapDeleteByPrimaryKeyElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the deleteByPrimaryKey element is generated.
abstract boolean sqlMapDocumentGenerated(Document document, IntrospectedTable introspectedTable)
This method is called when the SqlMap document has been generated.
abstract boolean sqlMapExampleWhereClauseElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the exampleWhereClause element is generated.
abstract boolean sqlMapGenerated(GeneratedXmlFile sqlMap, IntrospectedTable introspectedTable)
This method is called when the SqlMap file has been generated.
abstract boolean sqlMapInsertElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the insert element is generated.
abstract boolean sqlMapInsertSelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the insert selective element is generated.
abstract 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.
abstract boolean sqlMapResultMapWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the base resultMap is generated.
abstract boolean sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the selectByExampleWithBLOBs element is generated.
abstract boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the selectByExample element is generated.
abstract boolean sqlMapSelectByPrimaryKeyElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the selectByPrimaryKey element is generated.
abstract boolean sqlMapUpdateByExampleSelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the updateByExampleSelective element is generated.
abstract boolean sqlMapUpdateByExampleWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithBLOBs element is generated.
abstract boolean sqlMapUpdateByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the updateByExampleWithourBLOBs element is generated.
abstract boolean sqlMapUpdateByPrimaryKeySelectiveElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeySelective element is generated.
abstract boolean sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeyWithBLOBs element is generated.
abstract boolean sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable)
This method is called when the updateByPrimaryKeyWithoutBLOBs element is generated.
abstract boolean validate(List<String> warnings)
This method is called after all the setXXX methods are called, but before any other method is called.

Public Methods

public abstract 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.

public abstract boolean clientCountByExampleMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the countByExample method has been generated in the client implementation class.

Parameters
method the generated countByExample method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientDeleteByExampleMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the deleteByExample method has been generated in the client implementation class.

Parameters
method the generated deleteByExample method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientDeleteByPrimaryKeyMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the deleteByPrimaryKey method has been generated in the client implementation class.

Parameters
method the generated deleteByPrimaryKey method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract boolean clientGenerated (Interface interfaze, TopLevelClass topLevelClass, 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
topLevelClass the generated implementation class 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.

public abstract 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.

public abstract boolean clientInsertMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the insert method has been generated in the client implementation class.

Parameters
method the generated insert method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientInsertSelectiveMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the insert selective method has been generated in the client implementation class.

Parameters
method the generated insert method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientSelectByExampleWithBLOBsMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the selectByExampleWithBLOBs method has been generated in the client implementation class.

Parameters
method the generated selectByExampleWithBLOBs method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientSelectByExampleWithoutBLOBsMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the selectByExampleWithoutBLOBs method has been generated in the client implementation class.

Parameters
method the generated selectByExampleWithoutBLOBs method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientSelectByPrimaryKeyMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the selectByPrimaryKey method has been generated in the client implementation class.

Parameters
method the generated selectByPrimaryKey method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientUpdateByExampleSelectiveMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the updateByExampleSelective method has been generated in the client implementation class.

Parameters
method the generated updateByExampleSelective method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientUpdateByExampleWithBLOBsMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the updateByExampleWithBLOBs method has been generated in the client implementation class.

Parameters
method the generated updateByExampleWithBLOBs method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientUpdateByExampleWithoutBLOBsMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the updateByExampleWithoutBLOBs method has been generated in the client implementation class.

Parameters
method the generated updateByExampleWithoutBLOBs method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientUpdateByPrimaryKeySelectiveMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the updateByPrimaryKeySelective method has been generated in the client implementation class.

Parameters
method the generated updateByPrimaryKeySelective method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientUpdateByPrimaryKeyWithBLOBsMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the updateByPrimaryKeyWithBLOBs method has been generated in the client implementation class.

Parameters
method the generated updateByPrimaryKeyWithBLOBs method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract boolean clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated (Method method, TopLevelClass topLevelClass, IntrospectedTable introspectedTable)

This method is called when the updateByPrimaryKeyWithoutBLOBs method has been generated in the client implementation class.

Parameters
method the generated updateByPrimaryKeyWithBLOBs method
topLevelClass the partially implemented client implementation class. You can add additional imported classes to the implementation 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract void setContext (Context context)

Set the context under which this plugin is running

public abstract void setProperties (Properties properties)

Set properties from the plugin configuration

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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.

public abstract 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