-
- All Implemented Interfaces:
public final class QueryProFileMaker
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classQueryProFileMaker.Companion
-
Method Summary
Modifier and Type Method Description final QueryProFileMakerchain()生成的JavaBean允许链式set final QueryProFileMakerdebug(Boolean useLogger)显示更多输出 final QueryProFileMakerdebug()显示更多输出 final QueryProFileMakerdb(DbInfo db)指定db final QueryProFileMakertables(String tables)指定需要生成QueryPro文件的表名,允许为"*",代表所有, 注意对于特殊构造的数据库结构,可能被注入Java代码到生成的(Entity, Dao)源文件中,所以可能有任意代码执行的风险 final QueryProFileMakerexcludeTables(String tables)指定需要排除生成QueryPro文件的表名 final QueryProFileMakerexcludeTables(Function1<String, Boolean> filter)指定需要排除生成QueryPro文件的表名 final QueryProFileMakerdaoExCodes(String codes)加入dao中的额外方法 final QueryProFileMakerentityExMethods(String codes)加入实体类的额外方法 final QueryProFileMakerdefaultDataSource(String code)默认的DataSource获取方法 final QueryProFileMakerreplaceMode(Boolean replaceMode)是否替换掉已有的文件 默认false final QueryProFileMakerreplaceMode()是否替换掉已有的文件 默认false final QueryProFileMakerskipReplaceEntity(Boolean skipRepalceEntity)final QueryProFileMakerskipReplaceEntity()final QueryProFileMakerdisableKtNoArgMode(Boolean disableKtNoArgMode)关闭Kotlin的no-arg模式kotlin data class配合一些插件,如kotlin-maven-noarg 会自动为data class生成无参构造函数, 如果没有使用这些插件,可以使用该方法显示指定所有参数的默认值,这样Kotlin就会自动生成默认的无参构造函数 final QueryProFileMakerdbJavaNameConverter(Function1<ConvertInfo, String> nameConverter)自定义名称转换器(用于转换数据库table, column名称至java类名,属性名) final QueryProFileMakerswaggerSupport(Boolean swaggerSupport)添加swagger的支持(包括但不限于在Entity上面添加ApiModelProperty注解) final QueryProFileMakerentityFileTemplatePath(String path)自定义entity的模板 final Unitcreate()-
-
Method Detail
-
chain
final QueryProFileMaker chain()
生成的JavaBean允许链式set
-
debug
@JvmOverloads() final QueryProFileMaker debug(Boolean useLogger)
显示更多输出
-
debug
@JvmOverloads() final QueryProFileMaker debug()
显示更多输出
-
db
final QueryProFileMaker db(DbInfo db)
指定db
-
tables
final QueryProFileMaker tables(String tables)
指定需要生成QueryPro文件的表名,允许为"*",代表所有, 注意对于特殊构造的数据库结构,可能被注入Java代码到生成的(Entity, Dao)源文件中,所以可能有任意代码执行的风险
-
excludeTables
final QueryProFileMaker excludeTables(String tables)
指定需要排除生成QueryPro文件的表名
-
excludeTables
final QueryProFileMaker excludeTables(Function1<String, Boolean> filter)
指定需要排除生成QueryPro文件的表名
-
daoExCodes
final QueryProFileMaker daoExCodes(String codes)
加入dao中的额外方法
-
entityExMethods
final QueryProFileMaker entityExMethods(String codes)
加入实体类的额外方法
-
defaultDataSource
final QueryProFileMaker defaultDataSource(String code)
默认的DataSource获取方法
-
replaceMode
@JvmOverloads() final QueryProFileMaker replaceMode(Boolean replaceMode)
是否替换掉已有的文件 默认false
-
replaceMode
@JvmOverloads() final QueryProFileMaker replaceMode()
是否替换掉已有的文件 默认false
-
skipReplaceEntity
@JvmOverloads() final QueryProFileMaker skipReplaceEntity(Boolean skipRepalceEntity)
-
skipReplaceEntity
@JvmOverloads() final QueryProFileMaker skipReplaceEntity()
-
disableKtNoArgMode
final QueryProFileMaker disableKtNoArgMode(Boolean disableKtNoArgMode)
关闭Kotlin的no-arg模式
kotlin data class配合一些插件,如kotlin-maven-noarg 会自动为data class生成无参构造函数, 如果没有使用这些插件,可以使用该方法显示指定所有参数的默认值,这样Kotlin就会自动生成默认的无参构造函数
-
dbJavaNameConverter
final QueryProFileMaker dbJavaNameConverter(Function1<ConvertInfo, String> nameConverter)
自定义名称转换器(用于转换数据库table, column名称至java类名,属性名)
- Parameters:
nameConverter- NameConverter
-
swaggerSupport
final QueryProFileMaker swaggerSupport(Boolean swaggerSupport)
添加swagger的支持(包括但不限于在Entity上面添加ApiModelProperty注解)
-
entityFileTemplatePath
final QueryProFileMaker entityFileTemplatePath(String path)
自定义entity的模板
-
-
-
-