Class AptAbstractWrapper<T,Children extends AptAbstractWrapper<T,Children>>
java.lang.Object
com.baomidou.mybatisplus.core.conditions.Wrapper<T>
com.github.yulichang.extension.apt.JoinAbstractWrapper<T,Children>
com.github.yulichang.extension.apt.AptAbstractWrapper<T,Children>
- All Implemented Interfaces:
com.baomidou.mybatisplus.core.conditions.interfaces.Nested<Children,,Children> com.baomidou.mybatisplus.core.conditions.ISqlSegment,Compare<Children>,CompareIfExists<Children>,Func<Children>,FuncLambda<Children>,OnCompare<Children>,QueryJoin<Children,,T> MPJBaseJoin<T>,StringJoin<Children,,T> CompareStr<Children,,String> CompareStrIfExists<Children,,String> FuncStr<Children,,String> Join<Children>,Serializable
- Direct Known Subclasses:
AptQueryWrapper
public abstract class AptAbstractWrapper<T,Children extends AptAbstractWrapper<T,Children>>
extends JoinAbstractWrapper<T,Children>
implements QueryJoin<Children,T>
参考
AbstractLambdaWrapper- Author:
- yulichang
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String主表别名protected TableMapapt别名对应protected BaseColumn<T>protected boolean主表 表名处理方法protected final com.baomidou.mybatisplus.core.conditions.SharedString查询表protected boolean是否有表别名protected booleanprotected String连表关键字 on 条件 func 使用protected LogicDelTypeEnum逻辑删除位置protected boolean主表逻辑删除开关protected booleanprotected PageInfoprotected boolean是否构建是否存在一对多protected booleanprotected boolean副表逻辑删除开关protected String副表别名主表 表名处理方法protected int表序号Fields inherited from class com.github.yulichang.extension.apt.JoinAbstractWrapper
checkSqlInjection, expression, ifExists, index, joinClass, lastSql, onWrappers, paramAlias, paramNameSeq, paramNameValuePairs, sqlComment, sqlFirst, tableName, typedThis -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAptAbstractWrapper(BaseColumn<T> baseColumn) 构造方法protectedAptAbstractWrapper(BaseColumn<T> baseColumn, T entity) 构造方法 -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckJoinTable(Class<?> clazz) 检验表是否已连接voidclear()protected StringcolumnsToString(Column... columns) protected StringcolumnToString(Column column) 获取 columnName关闭主表逻辑删除关闭副表逻辑删除protected SelectCachegetFrom()获取连表部分语句boolean主表部分逻辑删除支持副表部分逻辑删除支持getTableName(String tableName) getTableNameEnc(String tableName) protected voidinitNeed()必要的初始化boolean是否使用默认注解OrderBy排序自定义关键词连接<R> Childrenjoin(String keyWord, BaseColumn<R> baseColumn, MFunction<AptAbstractWrapper<T, ?>> function) 内部调用, 不建议使用调整逻辑删除位置为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.extension.apt.JoinAbstractWrapper
addCondition, addCondition, addCondition, addNestedCondition, allEqStr, allEqStr, and, and, appendSqlSegments, apply, applyFunc, applyFunc, around, between, between, checkSqlInjection, clone, columnSqlInjectFilter, columnsToString, columnsToString, columnsToString, columnToSqlSegment, columnToSqlSegment, columnToString, comment, eq, eq, eq, eqSql, eqSql, exists, first, formatParam, formatSqlMaybeWithParam, func, ge, ge, ge, geSql, geSql, getEntity, getEntityClass, getExpression, getParamAlias, getSqlComment, getSqlFirst, getSqlSegment, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupByLambda, 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, orderByAscLambda, orderByDesc, orderByDesc, orderByDesc, orderByDescLambda, orderByStr, setEntity, setEntityClass, setIfExists, setIfExists, setParamAlias, toChildren, toChildrenMethods 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.extension.apt.interfaces.Compare
between, eq, ge, gt, le, like, likeLeft, likeRight, lt, ne, notBetween, notLike, notLikeLeft, notLikeRightMethods inherited from interface com.github.yulichang.extension.apt.interfaces.CompareIfExists
eqIfExists, geIfExists, getIfExists, gtIfExists, leIfExists, likeIfExists, likeLeftIfExists, likeRightIfExists, ltIfExists, neIfExists, notLikeIfExists, notLikeLeftIfExists, 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.extension.apt.interfaces.Func
eqSql, func, func, geSql, groupBy, groupBy, groupBy, gtSql, having, in, in, inSql, isNotNull, isNull, leSql, ltSql, notIn, notIn, notInSql, orderByAsc, orderByAsc, orderByAsc, orderByAsc, orderByDesc, orderByDesc, orderByDesc, orderByDescMethods inherited from interface com.github.yulichang.extension.apt.interfaces.FuncLambda
groupBy, groupByLambda, orderByAsc, orderByAscLambda, orderByDesc, orderByDescLambdaMethods 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.Join
apply, around, comment, exists, first, last, notExists, orMethods inherited from interface com.github.yulichang.interfaces.MPJBaseJoin
getDeleteLogicSql, getDeleteSql, getUnionSqlMethods inherited from interface com.baomidou.mybatisplus.core.conditions.interfaces.Nested
and, nested, not, orMethods inherited from interface com.github.yulichang.extension.apt.interfaces.OnCompare
eq, ge, gt, le, lt, ne
-
Field Details
-
alias
主表别名 -
subTableAlias
副表别名 -
resultMap
protected boolean resultMap是否构建是否存在一对多 -
resultMapCollection
protected boolean resultMapCollection -
pageInfo
-
pageByMain
protected boolean pageByMain -
tableIndex
protected int tableIndex表序号 -
isMain
protected boolean isMain -
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主表逻辑删除开关 -
baseColumn
-
aptIndex
apt别名对应
-
-
Constructor Details
-
AptAbstractWrapper
构造方法 -
AptAbstractWrapper
构造方法- Parameters:
entity- 主表实体类
-
-
Method Details
-
pageByMain
根据主表分页 -
pageByMain
根据主表分页 -
getPageInfo
-
setTableName
public Children setTableName(com.baomidou.mybatisplus.core.toolkit.support.SFunction<String, String> tableFunc) 设置表别名 设置表别名注意sql注入问题- Returns:
- 自定义表别名
-
getTableName
-
getTableNameEnc
-
columnsToString
-
columnToString
Description copied from class:JoinAbstractWrapper获取 columnName- Specified by:
columnToStringin classJoinAbstractWrapper<T,Children extends AptAbstractWrapper<T, Children>>
-
getCache
-
disableSubLogicDel
关闭副表逻辑删除副表逻辑删除默认在where语句中 但有时候需要让它出现在on语句中, 这两种写法区别还是很大的 所以可以关闭副表逻辑删除, 通过on语句多条件, 自己实现on语句的逻辑删除
-
enableSubLogicDel
-
disableLogicDel
关闭主表逻辑删除 -
enableLogicDel
-
getSubLogicSql
副表部分逻辑删除支持 -
getLogicSql
public boolean getLogicSql()主表部分逻辑删除支持 -
logicDelToOn
调整逻辑删除位置为ON语句 -
logicDelToWhere
调整逻辑删除位置为WHERE语句 -
getFrom
获取连表部分语句 -
checkJoinTable
检验表是否已连接 -
join
public <R> Children join(String keyWord, BaseColumn<R> baseColumn, MFunction<AptAbstractWrapper<T, ?>> function) 内部调用, 不建议使用 -
join
自定义关键词连接- Specified by:
joinin interfaceStringJoin<T,Children extends AptAbstractWrapper<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 AptAbstractWrapper<T, Children>>
-