public abstract class JoinAbstractLambdaWrapper<T,Children extends JoinAbstractLambdaWrapper<T,Children>> extends JoinAbstractWrapper<T,Children> implements QueryJoin<Children,T>
AbstractLambdaWrapperJoinAbstractWrapper.DoSomething| 限定符和类型 | 字段和说明 |
|---|---|
protected String |
alias
主表别名
|
protected boolean |
dynamicTableName
主表 表名处理方法
|
protected com.baomidou.mybatisplus.core.conditions.SharedString |
from
查询表
|
protected boolean |
hasAlias
是否有表别名
|
protected String |
keyWord
连表关键字 on 条件 func 使用
|
protected LogicDelTypeEnum |
logicDelType
逻辑删除位置
|
protected boolean |
logicSql
主表逻辑删除开关
|
protected boolean |
resultMap
是否构建是否存在一对多
|
protected boolean |
subLogicSql
副表逻辑删除开关
|
protected String |
subTableAlias
副表别名
|
protected java.util.function.Function<String,String> |
tableFunc
主表 表名处理方法
|
protected int |
tableIndex
表序号
|
checkSqlInjection, expression, ifAbsent, index, isMain, isOn, joinClass, lastSql, onWrappers, paramAlias, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, tableList, tableName, typedThis| 构造器和说明 |
|---|
JoinAbstractLambdaWrapper()
推荐使用 带 class 的构造方法
|
JoinAbstractLambdaWrapper(Class<T> clazz)
推荐使用此构造方法
|
JoinAbstractLambdaWrapper(Class<T> clazz,
String alias)
构造方法
|
JoinAbstractLambdaWrapper(String alias)
自定义主表别名
|
JoinAbstractLambdaWrapper(T entity)
构造方法
|
JoinAbstractLambdaWrapper(T entity,
String alias)
构造方法
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear() |
protected <X> String |
columnsToString(Integer index,
PrefixEnum prefixEnum,
String alias,
X... columns)
多字段转换为逗号 "," 分割字符串
|
protected String |
columnToString(Integer index,
String alias,
com.baomidou.mybatisplus.core.toolkit.support.SFunction<?,?> column,
boolean isJoin,
PrefixEnum prefixEnum) |
protected <X> String |
columnToString(Integer index,
String alias,
X column,
boolean isJoin,
PrefixEnum prefixEnum)
获取 columnName
|
Children |
disableLogicDel()
关闭主表逻辑删除
|
Children |
disableSubLogicDel()
关闭副表逻辑删除
副表逻辑删除默认在where语句中
但有时候需要让它出现在on语句中, 这两种写法区别还是很大的
所以可以关闭副表逻辑删除, 通过on语句多条件, 自己实现on语句的逻辑删除
|
Children |
enableLogicDel() |
Children |
enableSubLogicDel() |
protected SelectCache |
getCache(com.baomidou.mybatisplus.core.toolkit.support.SFunction<?,?> fn) |
protected String |
getDefault(Integer index,
Class<?> clazz,
boolean isJoin,
PrefixEnum prefixEnum)
返回前缀
|
String |
getFrom()
获取连表部分语句
|
boolean |
getLogicSql()
主表部分逻辑删除支持
|
String |
getSubLogicSql()
副表部分逻辑删除支持
|
String |
getTableName(String tableName) |
String |
getTableNameEnc(String tableName) |
protected void |
initNeed()
必要的初始化
|
boolean |
isUseAnnotationOrderBy()
是否使用默认注解
OrderBy 排序 |
Children |
join(String keyWord,
boolean condition,
String joinSql)
自定义关键词连接
|
<R> Children |
join(String keyWord,
Class<R> clazz,
String tableAlias,
java.util.function.BiConsumer<JoinAbstractLambdaWrapper<T,?>,Children> consumer)
内部调用, 不建议使用
|
Children |
logicDelToOn()
调整逻辑删除位置为ON语句
|
Children |
logicDelToWhere()
调整逻辑删除位置为WHERE语句
|
Children |
setTableName(java.util.function.Function<String,String> tableFunc)
设置表别名
设置表别名注意sql注入问题
|
addCondition, addCondition, addCondition, addNestedCondition, allEq, allEq, allEqStr, allEqStr, and, and, appendSqlSegments, apply, between, between, checkSqlInjection, clone, columnSqlInjectFilter, columnsToString, columnsToString, columnsToString, columnToSqlSegment, columnToSqlSegment, columnToSqlSegmentS, columnToString, comment, eq, eq, eq, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, ge, ge, geSql, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupByStr, gt, gt, gt, gtSql, gtSql, having, in, in, in, in, inExpression, inExpression, inSql, inSql, instance, instance, instanceEmpty, isNotNull, isNotNull, isNull, isNull, last, le, le, le, leSql, leSql, like, like, likeLeft, likeLeft, likeRight, likeRight, likeValue, likeValue, lt, lt, lt, ltSql, ltSql, maybeDo, ne, ne, ne, nested, not, not, notBetween, notBetween, notExists, notIn, notIn, notIn, notIn, notInSql, notInSql, notLike, notLike, notLikeLeft, notLikeLeft, notLikeRight, notLikeRight, or, or, orderBy, orderBy, orderBy, orderBy, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByStr, setEntity, setEntityClass, setIfAbsent, setIfAbsent, setParamAlias, toChildren, toChildrengetCustomSqlSegment, getSqlSelect, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, isNonEmptyOfEntity, isNonEmptyOfNormal, isNonEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhereequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoinfullJoin, fullJoin, innerJoin, innerJoin, leftJoin, leftJoin, rightJoin, rightJoingetDeleteLogicSql, getDeleteSql, getUnionSqleqIfAbsent, eqIfAbsent, geIfAbsent, geIfAbsent, getIfAbsent, gtIfAbsent, gtIfAbsent, leIfAbsent, leIfAbsent, likeIfAbsent, likeIfAbsent, likeLeftIfAbsent, likeLeftIfAbsent, likeRightIfAbsent, likeRightIfAbsent, ltIfAbsent, ltIfAbsent, neIfAbsent, neIfAbsent, notLikeIfAbsent, notLikeIfAbsent, notLikeLeftIfAbsent, notLikeLeftIfAbsent, notLikeRightIfAbsent, notLikeRightIfAbsentallEq, allEq, allEq, allEq, between, between, between, eq, eq, eq, ge, ge, ge, gt, gt, gt, le, le, le, like, like, like, likeLeft, likeLeft, likeLeft, likeRight, likeRight, likeRight, lt, lt, lt, ne, ne, ne, notBetween, notBetween, notBetween, notLike, notLike, notLike, notLikeLeft, notLikeLeft, notLikeLeft, notLikeRight, notLikeRight, notLikeRightapply, comment, exists, first, last, notExists, orfunc, geSql, geSql, geSql, groupBy, groupBy, groupBy, groupBy, groupBy, gtSql, gtSql, gtSql, having, in, in, in, in, in, in, inSql, inSql, inSql, isNotNull, isNotNull, isNotNull, isNull, isNull, isNull, leSql, leSql, leSql, ltSql, ltSql, ltSql, notIn, notIn, notIn, notIn, notIn, notIn, notInSql, notInSql, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDesceq, eq, eq, eq, eq, eq, eq, ge, ge, ge, ge, ge, ge, ge, gt, gt, gt, gt, gt, gt, gt, le, le, le, le, le, le, le, lt, lt, lt, lt, lt, lt, lt, ne, ne, ne, ne, ne, ne, neeqIfAbsent, geIfAbsent, getIfAbsent, gtIfAbsent, leIfAbsent, likeIfAbsent, likeLeftIfAbsent, likeRightIfAbsent, ltIfAbsent, neIfAbsent, notLikeIfAbsent, notLikeLeftIfAbsent, notLikeRightIfAbsentallEqStr, allEqStr, allEqStr, allEqStr, between, eq, ge, gt, le, like, likeLeft, likeRight, lt, ne, notBetween, notLike, notLikeLeft, notLikeRightgeSql, groupBy, groupBy, groupByStr, gtSql, in, in, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByAscStr, orderByAscStr, orderByDesc, orderByDesc, orderByDesc, orderByDesc, orderByDescStr, orderByDescStrprotected String alias
protected String subTableAlias
protected boolean resultMap
protected int tableIndex
protected boolean dynamicTableName
protected java.util.function.Function<String,String> tableFunc
protected LogicDelTypeEnum logicDelType
protected final com.baomidou.mybatisplus.core.conditions.SharedString from
protected boolean hasAlias
protected String keyWord
protected boolean subLogicSql
protected boolean logicSql
public JoinAbstractLambdaWrapper()
public JoinAbstractLambdaWrapper(T entity)
entity - 主表实体public JoinAbstractLambdaWrapper(String alias)
public JoinAbstractLambdaWrapper(Class<T> clazz, String alias)
clazz - 主表class类alias - 主表别名public Children setTableName(java.util.function.Function<String,String> tableFunc)
protected <X> String columnToString(Integer index, String alias, X column, boolean isJoin, PrefixEnum prefixEnum)
JoinAbstractWrappercolumnToString 在类中 JoinAbstractWrapper<T,Children extends JoinAbstractLambdaWrapper<T,Children>>@SafeVarargs protected final <X> String columnsToString(Integer index, PrefixEnum prefixEnum, String alias, X... columns)
JoinAbstractWrappercolumns - 多字段protected String columnToString(Integer index, String alias, com.baomidou.mybatisplus.core.toolkit.support.SFunction<?,?> column, boolean isJoin, PrefixEnum prefixEnum)
protected SelectCache getCache(com.baomidou.mybatisplus.core.toolkit.support.SFunction<?,?> fn)
protected String getDefault(Integer index, Class<?> clazz, boolean isJoin, PrefixEnum prefixEnum)
public Children disableSubLogicDel()
副表逻辑删除默认在where语句中 但有时候需要让它出现在on语句中, 这两种写法区别还是很大的 所以可以关闭副表逻辑删除, 通过on语句多条件, 自己实现on语句的逻辑删除
public Children enableSubLogicDel()
public Children disableLogicDel()
public Children enableLogicDel()
public String getSubLogicSql()
public boolean getLogicSql()
public Children logicDelToOn()
public Children logicDelToWhere()
public String getFrom()
public <R> Children join(String keyWord, Class<R> clazz, String tableAlias, java.util.function.BiConsumer<JoinAbstractLambdaWrapper<T,?>,Children> consumer)
public Children join(String keyWord, boolean condition, String joinSql)
join 在接口中 StringJoin<Children extends JoinAbstractLambdaWrapper<T,Children>,T>keyWord - 连表关键词condition - 条件joinSql - sqlpublic boolean isUseAnnotationOrderBy()
OrderBy 排序protected void initNeed()
public void clear()
clear 在类中 JoinAbstractWrapper<T,Children extends JoinAbstractLambdaWrapper<T,Children>>Copyright © 2023. All rights reserved.