类 AbstractMapperMethodHandler
java.lang.Object
com.baomidou.mybatisplus.generator.index.AbstractMapperMethodHandler
- 所有已实现的接口:
IGenerateMapperMethodHandler
public abstract class AbstractMapperMethodHandler
extends Object
implements IGenerateMapperMethodHandler
- 从以下版本开始:
- 3.5.10
- 作者:
- nieqiurong
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明buildKotlinMethod(String methodName, String args, String returnValue, String returnBody) 构建Kotlin方法buildMethod(String methodName, String args, String returnValue, String returnBody) 生成Java方法(default)booleanisPrimaryKey(String indexName) 判断当前索引名称是否为主键索引 (索引名为PRIMARY或PRIMARY开头的为主键索引)从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.baomidou.mybatisplus.generator.IGenerateMapperMethodHandler
getImportPackages, getMethodList
-
构造器详细资料
-
AbstractMapperMethodHandler
public AbstractMapperMethodHandler()
-
-
方法详细资料
-
buildMethod
生成Java方法(default)default ${returnValue} ${methodName}(${args}) { return ${returnBody}; } Example:default UserInfo selectByCardNo(String cardNo) { return selectOne(Wrappers.query().eq(TUserInfo.CARD_NO, cardNo)); } -
buildKotlinMethod
public String buildKotlinMethod(String methodName, String args, String returnValue, String returnBody) 构建Kotlin方法fun ${methodName}(${args}) :${returnValue} { return ${returnBody}; }Example:fun selectByCardNo(cardNo: String) :UserInfo? { return selectOne(Wrappers.query().eq(UserInfo.CARD_NO, cardNo)); } - 参数:
methodName- 方法名args- 参数列表returnValue- 返回值returnBody- 返回体- 返回:
- 方法
-
isPrimaryKey
判断当前索引名称是否为主键索引 (索引名为PRIMARY或PRIMARY开头的为主键索引)- 参数:
indexName- 索引名称- 返回:
- 是否为主键索引
- 从以下版本开始:
- 3.5.12
-