Package com.github.yulichang.wrapper
Class JoinAbstractLambdaWrapper<T,Children extends JoinAbstractLambdaWrapper<T,Children>>
java.lang.Object
com.baomidou.mybatisplus.core.conditions.Wrapper<T>
com.github.yulichang.wrapper.JoinAbstractWrapper<T,Children>
com.github.yulichang.wrapper.JoinAbstractLambdaWrapper<T,Children>
- All Implemented Interfaces:
com.baomidou.mybatisplus.core.conditions.ISqlSegment,MPJBaseJoin<T>,StringJoin<Children,,T> Ext<Children>,Compare<Children>,CompareIfExists<Children>,CompareStr<Children,,String> CompareStrIfExists<Children,,String> CompareWrapper<Children>,Func<Children>,FuncStr<Children,,String> FuncWrapper<Children>,Join<Children>,Nested<Children,,Children> OnCompare<Children>,QueryJoin<Children,,T> Serializable
- Direct Known Subclasses:
DeleteJoinWrapper,MPJLambdaWrapper,UpdateJoinWrapper
public abstract class JoinAbstractLambdaWrapper<T,Children extends JoinAbstractLambdaWrapper<T,Children>>
extends JoinAbstractWrapper<T,Children>
implements QueryJoin<Children,T>, Ext<Children>
参考
AbstractLambdaWrapper- Author:
- yulichang
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean主表 表名处理方法protected final com.baomidou.mybatisplus.core.conditions.SharedString查询表protected boolean是否有表别名protected String连表关键字 on 条件 func 使用protected LogicDelTypeEnum逻辑删除位置protected boolean主表逻辑删除开关protected booleanprotected PageInfoprotected boolean是否存在对一或对多protected boolean是否存在一对多protected boolean副表逻辑删除开关主表 表名处理方法protected int表序号Fields inherited from class com.github.yulichang.wrapper.JoinAbstractWrapper
alias, checkSqlInjection, expression, ifExists, index, isMain, isOn, joinClass, lastSql, onWrappers, paramAlias, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, subTableAlias, tableList, tableName, typedThis -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected推荐使用 带 class 的构造方法protectedJoinAbstractLambdaWrapper(Class<T> clazz) 推荐使用此构造方法protectedJoinAbstractLambdaWrapper(Class<T> clazz, String alias) 构造方法protectedJoinAbstractLambdaWrapper(String alias) 自定义主表别名protectedJoinAbstractLambdaWrapper(T entity) 构造方法protectedJoinAbstractLambdaWrapper(T entity, String alias) 构造方法 -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckJoinTable(Class<?> clazz) 检验表是否已连接voidclear()protected final <X> StringcolumnsToString(Integer index, PrefixEnum prefixEnum, String alias, com.baomidou.mybatisplus.core.toolkit.support.SFunction<X, ?>... columns) protected <X> StringcolumnToString(Integer index, String alias, com.baomidou.mybatisplus.core.toolkit.support.SFunction<X, ?> column, boolean isJoin, PrefixEnum prefixEnum, boolean orderBy) 获取 columnName关闭主表逻辑删除关闭副表逻辑删除from(MFunction<MPJLambdaWrapper<T>> fromWrapper) protected SelectCachegetCache(com.baomidou.mybatisplus.core.toolkit.support.SFunction<?, ?> fn) protected StringgetDefault(Integer index, Class<?> clazz, boolean isJoin, PrefixEnum prefixEnum) 返回前缀getFrom()获取连表部分语句boolean主表部分逻辑删除支持副表部分逻辑删除支持getTableName(String tableName) getTableNameEnc(String tableName) protected voidinitNeed()必要的初始化boolean是否使用默认注解OrderBy排序自定义关键词连接<R> Childrenjoin(String keyWord, Class<R> clazz, MConsumer<MPJLambdaWrapper<R>> table, String tableAlias, BiConsumer<JoinAbstractLambdaWrapper<T, ?>, Children> consumer) 内部调用, 不建议使用调整逻辑删除位置为ON语句调整逻辑删除位置为WHERE语句根据主表分页pageByMain(MFunction<PageInfo> function) 根据主表分页setTableName(com.baomidou.mybatisplus.core.toolkit.support.SFunction<String, String> tableFunc) 设置表别名 设置表别名注意sql注入问题Methods inherited from class com.github.yulichang.wrapper.JoinAbstractWrapper
addCondition, addCondition, addCondition, addCondition, addNestedCondition, allEq, allEq, allEqStr, allEqStr, and, and, appendSqlSegments, apply, applyFunc, applyFunc, around, between, between, checkSqlInjection, clone, columnSqlInjectFilter, columnsToString, columnsToString, columnsToString, columnToSqlSegment, columnToSqlSegment, columnToSqlSegmentS, columnToString, comment, eq, eq, eq, eq, eqSql, eqSql, exists, exists, first, formatParam, formatSqlMaybeWithParam, fromInstance, func, ge, ge, ge, ge, geSql, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupByStr, gt, gt, gt, gt, gtSql, gtSql, having, in, in, in, in, in, inExpression, inExpression, inSql, inSql, instance, instance, instanceEmpty, isNotNull, isNotNull, isNotNull, isNull, isNull, isNull, last, le, le, le, le, leSql, leSql, like, like, likeLeft, likeLeft, likeRight, likeRight, likeValue, likeValue, lt, lt, lt, lt, ltSql, ltSql, maybeDo, ne, ne, ne, ne, nested, not, not, notBetween, notBetween, notExists, notExists, notIn, 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, setIfExists, setIfExists, setParamAlias, subInstance, subInstanceMethods inherited from class com.baomidou.mybatisplus.core.conditions.Wrapper
getCustomSqlSegment, getSqlSelect, getSqlSet, getTargetSql, isEmptyOfEntity, isEmptyOfNormal, isEmptyOfWhere, isNonEmptyOfEntity, isNonEmptyOfNormal, isNonEmptyOfWhere, nonEmptyOfEntity, nonEmptyOfNormal, nonEmptyOfWhereMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.yulichang.wrapper.interfaces.Compare
allEq, 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, notLikeRightMethods inherited from interface com.github.yulichang.wrapper.interfaces.CompareIfExists
eqIfExists, eqIfExists, geIfExists, geIfExists, getIfExists, gtIfExists, gtIfExists, leIfExists, leIfExists, likeIfExists, likeIfExists, likeLeftIfExists, likeLeftIfExists, likeRightIfExists, likeRightIfExists, ltIfExists, ltIfExists, neIfExists, neIfExists, notLikeIfExists, notLikeIfExists, notLikeLeftIfExists, notLikeLeftIfExists, notLikeRightIfExists, notLikeRightIfExistsMethods inherited from interface com.github.yulichang.wrapper.interfaces.CompareStr
allEqStr, allEqStr, allEqStr, allEqStr, between, eq, ge, gt, le, like, likeLeft, likeRight, lt, ne, notBetween, notLike, notLikeLeft, notLikeRightMethods inherited from interface com.github.yulichang.wrapper.interfaces.CompareStrIfExists
eqIfExists, geIfExists, getIfExists, gtIfExists, leIfExists, likeIfExists, likeLeftIfExists, likeRightIfExists, ltIfExists, neIfExists, notLikeIfExists, notLikeLeftIfExists, notLikeRightIfExistsMethods inherited from interface com.github.yulichang.wrapper.interfaces.CompareWrapper
eq, eq, eq, ge, ge, ge, gt, gt, gt, le, le, le, lt, lt, lt, ne, ne, neMethods inherited from interface com.github.yulichang.wrapper.interfaces.Func
eqSql, eqSql, eqSql, func, func, 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, orderByDescMethods inherited from interface com.github.yulichang.wrapper.interfaces.FuncStr
eqSql, geSql, 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, orderByDescStrMethods inherited from interface com.github.yulichang.wrapper.interfaces.FuncWrapper
exists, in, in, in, isNotNull, isNotNull, isNotNull, isNull, isNull, isNull, notExists, notIn, notIn, notInMethods inherited from interface com.github.yulichang.wrapper.interfaces.Join
apply, around, comment, exists, first, last, notExists, orMethods inherited from interface com.github.yulichang.interfaces.MPJBaseJoin
getDeleteLogicSql, getDeleteSql, getUnionSqlMethods inherited from interface com.github.yulichang.wrapper.interfaces.Nested
and, nested, not, orMethods inherited from interface com.github.yulichang.wrapper.interfaces.OnCompare
eq, 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, neMethods inherited from interface com.github.yulichang.wrapper.interfaces.QueryJoin
fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin
-
Field Details
-
resultMap
protected boolean resultMap是否存在对一或对多 -
resultMapCollection
protected boolean resultMapCollection是否存在一对多 -
pageInfo
-
pageByMain
protected boolean pageByMain -
tableIndex
protected int tableIndex表序号 -
dynamicTableName
protected boolean dynamicTableName主表 表名处理方法 -
tableFunc
主表 表名处理方法 -
logicDelType
逻辑删除位置 -
from
protected final com.baomidou.mybatisplus.core.conditions.SharedString from查询表 -
hasAlias
protected boolean hasAlias是否有表别名 -
keyWord
连表关键字 on 条件 func 使用 -
subLogicSql
protected boolean subLogicSql副表逻辑删除开关 -
logicSql
protected boolean logicSql主表逻辑删除开关
-
-
Constructor Details
-
JoinAbstractLambdaWrapper
protected JoinAbstractLambdaWrapper()推荐使用 带 class 的构造方法 -
JoinAbstractLambdaWrapper
推荐使用此构造方法 -
JoinAbstractLambdaWrapper
构造方法- Parameters:
entity- 主表实体
-
JoinAbstractLambdaWrapper
自定义主表别名 -
JoinAbstractLambdaWrapper
构造方法- Parameters:
clazz- 主表class类alias- 主表别名
-
JoinAbstractLambdaWrapper
构造方法- Parameters:
entity- 主表实体类alias- 主表别名
-
-
Method Details
-
setAlias
-
pageByMain
根据主表分页 -
pageByMain
根据主表分页 -
getPageInfo
-
setTableName
public Children setTableName(com.baomidou.mybatisplus.core.toolkit.support.SFunction<String, String> tableFunc) 设置表别名 设置表别名注意sql注入问题- Returns:
- 自定义表别名
-
getTableName
-
getTableNameEnc
-
columnsToString
@SafeVarargs protected final <X> String columnsToString(Integer index, PrefixEnum prefixEnum, String alias, com.baomidou.mybatisplus.core.toolkit.support.SFunction<X, ?>... columns) -
columnToString
protected <X> String columnToString(Integer index, String alias, com.baomidou.mybatisplus.core.toolkit.support.SFunction<X, ?> column, boolean isJoin, PrefixEnum prefixEnum, boolean orderBy) Description copied from class:JoinAbstractWrapper获取 columnName- Specified by:
columnToStringin classJoinAbstractWrapper<T,Children extends JoinAbstractLambdaWrapper<T, Children>>
-
getCache
-
getDefault
返回前缀 -
disableSubLogicDel
关闭副表逻辑删除副表逻辑删除默认在where语句中 但有时候需要让它出现在on语句中, 这两种写法区别还是很大的 所以可以关闭副表逻辑删除, 通过on语句多条件, 自己实现on语句的逻辑删除
-
enableSubLogicDel
-
disableLogicDel
关闭主表逻辑删除 -
enableLogicDel
-
getSubLogicSql
副表部分逻辑删除支持 -
getLogicSql
public boolean getLogicSql()主表部分逻辑删除支持 -
logicDelToOn
调整逻辑删除位置为ON语句 -
logicDelToWhere
调整逻辑删除位置为WHERE语句 -
getFrom
获取连表部分语句 -
checkJoinTable
检验表是否已连接 -
from
-
join
public <R> Children join(String keyWord, Class<R> clazz, MConsumer<MPJLambdaWrapper<R>> table, String tableAlias, BiConsumer<JoinAbstractLambdaWrapper<T, ?>, Children> consumer) 内部调用, 不建议使用 -
join
自定义关键词连接- Specified by:
joinin interfaceStringJoin<T,Children extends JoinAbstractLambdaWrapper<T, Children>> - Parameters:
keyWord- 连表关键词condition- 条件joinSql- sql
-
isUseAnnotationOrderBy
public boolean isUseAnnotationOrderBy()是否使用默认注解OrderBy排序- Returns:
- true 使用 false 不使用
-
initNeed
protected void initNeed()必要的初始化 -
clear
public void clear()- Overrides:
clearin classJoinAbstractWrapper<T,Children extends JoinAbstractLambdaWrapper<T, Children>>
-