Class CacheNamespacePlugin
- All Implemented Interfaces:
Plugin
- cache_blocking
- cache_flushInterval
- cache_readWrite
- cache_size
- cache_implementation
- cache_eviction
- cache_skip
All properties (except cache_skip) correspond to properties of the MyBatis CacheNamespace annotation. Most properties are passed "as is" to the corresponding properties of the generated annotation. The properties "cache_implementation" and "cache_eviction" must be fully qualified class names. If specified, the values will be added to the import list of the mapper file, and the short names will be used in the generated annotation. All properties can be specified at the table level, or on the plugin element. The property on the table element will override any property on the plugin element.
If the "cache_skip" property is set to "true" - either on the plugin or on a specific table, the annotation will not be applied to the generated interface.
- Author:
- Jeff Butler
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.mybatis.generator.api.Plugin
Plugin.ModelClassType
-
Field Summary
Fields inherited from class org.mybatis.generator.api.PluginAdapter
context, properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
clientGenerated
(Interface interfaze, IntrospectedTable introspectedTable) This method is called when the entire client has been generated.boolean
mapperGenerated
(KotlinFile mapperFile, KotlinType mapper, IntrospectedTable introspectedTable) boolean
This method is called after all the setXXX methods are called, but before any other method is called.Methods inherited from class org.mybatis.generator.api.PluginAdapter
setContext, setProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mybatis.generator.api.Plugin
clientBasicCountMethodGenerated, clientBasicCountMethodGenerated, clientBasicDeleteMethodGenerated, clientBasicDeleteMethodGenerated, clientBasicInsertMethodGenerated, clientBasicInsertMethodGenerated, clientBasicInsertMultipleHelperMethodGenerated, clientBasicInsertMultipleHelperMethodGenerated, clientBasicInsertMultipleMethodGenerated, clientBasicInsertMultipleMethodGenerated, clientBasicSelectManyMethodGenerated, clientBasicSelectManyMethodGenerated, clientBasicSelectOneMethodGenerated, clientBasicSelectOneMethodGenerated, clientBasicUpdateMethodGenerated, clientBasicUpdateMethodGenerated, clientColumnListPropertyGenerated, clientCountByExampleMethodGenerated, clientDeleteByExampleMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientDeleteByPrimaryKeyMethodGenerated, clientGeneralCountMethodGenerated, clientGeneralCountMethodGenerated, clientGeneralDeleteMethodGenerated, clientGeneralDeleteMethodGenerated, clientGeneralSelectDistinctMethodGenerated, clientGeneralSelectDistinctMethodGenerated, clientGeneralSelectMethodGenerated, clientGeneralSelectMethodGenerated, clientGeneralUpdateMethodGenerated, clientGeneralUpdateMethodGenerated, clientInsertMethodGenerated, clientInsertMethodGenerated, clientInsertMultipleMethodGenerated, clientInsertMultipleMethodGenerated, clientInsertMultipleVarargMethodGenerated, clientInsertSelectiveMethodGenerated, clientInsertSelectiveMethodGenerated, clientSelectAllMethodGenerated, clientSelectByExampleWithBLOBsMethodGenerated, clientSelectByExampleWithoutBLOBsMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectByPrimaryKeyMethodGenerated, clientSelectListFieldGenerated, clientSelectOneMethodGenerated, clientSelectOneMethodGenerated, clientUpdateAllColumnsMethodGenerated, clientUpdateAllColumnsMethodGenerated, clientUpdateByExampleSelectiveMethodGenerated, clientUpdateByExampleWithBLOBsMethodGenerated, clientUpdateByExampleWithoutBLOBsMethodGenerated, clientUpdateByPrimaryKeyMethodGenerated, clientUpdateByPrimaryKeyMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeySelectiveMethodGenerated, clientUpdateByPrimaryKeyWithBLOBsMethodGenerated, clientUpdateByPrimaryKeyWithoutBLOBsMethodGenerated, clientUpdateSelectiveColumnsMethodGenerated, clientUpdateSelectiveColumnsMethodGenerated, contextGenerateAdditionalFiles, contextGenerateAdditionalFiles, contextGenerateAdditionalJavaFiles, contextGenerateAdditionalJavaFiles, contextGenerateAdditionalKotlinFiles, contextGenerateAdditionalKotlinFiles, contextGenerateAdditionalXmlFiles, contextGenerateAdditionalXmlFiles, dynamicSqlSupportGenerated, dynamicSqlSupportGenerated, initialized, kotlinDataClassGenerated, mapperExtensionsGenerated, modelBaseRecordClassGenerated, modelExampleClassGenerated, modelFieldGenerated, modelGetterMethodGenerated, modelPrimaryKeyClassGenerated, modelRecordWithBLOBsClassGenerated, modelSetterMethodGenerated, providerApplyWhereMethodGenerated, providerCountByExampleMethodGenerated, providerDeleteByExampleMethodGenerated, providerGenerated, providerInsertSelectiveMethodGenerated, providerSelectByExampleWithBLOBsMethodGenerated, providerSelectByExampleWithoutBLOBsMethodGenerated, providerUpdateByExampleSelectiveMethodGenerated, providerUpdateByExampleWithBLOBsMethodGenerated, providerUpdateByExampleWithoutBLOBsMethodGenerated, providerUpdateByPrimaryKeySelectiveMethodGenerated, shouldGenerate, sqlMapBaseColumnListElementGenerated, sqlMapBlobColumnListElementGenerated, sqlMapCountByExampleElementGenerated, sqlMapDeleteByExampleElementGenerated, sqlMapDeleteByPrimaryKeyElementGenerated, sqlMapDocumentGenerated, sqlMapExampleWhereClauseElementGenerated, sqlMapGenerated, sqlMapInsertElementGenerated, sqlMapInsertSelectiveElementGenerated, sqlMapResultMapWithBLOBsElementGenerated, sqlMapResultMapWithoutBLOBsElementGenerated, sqlMapSelectAllElementGenerated, sqlMapSelectByExampleWithBLOBsElementGenerated, sqlMapSelectByExampleWithoutBLOBsElementGenerated, sqlMapSelectByPrimaryKeyElementGenerated, sqlMapUpdateByExampleSelectiveElementGenerated, sqlMapUpdateByExampleWithBLOBsElementGenerated, sqlMapUpdateByExampleWithoutBLOBsElementGenerated, sqlMapUpdateByPrimaryKeySelectiveElementGenerated, sqlMapUpdateByPrimaryKeyWithBLOBsElementGenerated, sqlMapUpdateByPrimaryKeyWithoutBLOBsElementGenerated
-
Constructor Details
-
CacheNamespacePlugin
public CacheNamespacePlugin()
-
-
Method Details
-
validate
Description copied from interface:Plugin
This method is called after all the setXXX methods are called, but before any other method is called. This allows the plugin to determine whether it can run or not. For example, if the plugin requires certain properties to be set, and the properties are not set, then the plugin is invalid and will not run.- Parameters:
arg0
- 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
-
clientGenerated
Description copied from interface:Plugin
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 nullintrospectedTable
- 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.
-
mapperGenerated
public boolean mapperGenerated(KotlinFile mapperFile, KotlinType mapper, IntrospectedTable introspectedTable)
-