类 Wrapper<T>
java.lang.Object
com.baomidou.mybatisplus.core.conditions.Wrapper<T>
- 所有已实现的接口:
ISqlSegment,Serializable
- 直接已知子类:
AbstractWrapper
条件构造抽象类
- 从以下版本开始:
- 2018-05-25
- 作者:
- hubin
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract voidclear()条件清空获取自定义SQL 简化自定义XML复杂情况abstract T实体对象(子类实现)abstract MergeSegments获取 MergeSegments获取格式化后的执行sqlboolean深层实体判断属性boolean查询条件为空(不包含entity)boolean查询条件为空(包含entity)boolean深层实体判断属性boolean查询条件为空(不包含entity)boolean查询条件不为空(包含entity)boolean已过时。boolean已过时。boolean已过时。从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.baomidou.mybatisplus.core.conditions.ISqlSegment
getSqlSegment
-
构造器详细资料
-
Wrapper
public Wrapper()
-
-
方法详细资料
-
getEntity
实体对象(子类实现)- 返回:
- 泛型 T
-
getSqlSelect
-
getSqlSet
-
getSqlComment
-
getSqlFirst
-
getExpression
获取 MergeSegments -
getCustomSqlSegment
获取自定义SQL 简化自定义XML复杂情况使用方法: `select xxx from table` + ${ew.customSqlSegment}
注意事项: 1. 逻辑删除需要自己拼接条件 (之前自定义也同样) 2. 不支持wrapper中附带实体的情况 (wrapper自带实体会更麻烦) 3. 用法 ${ew.customSqlSegment} (不需要where标签包裹,切记!) 4. ew是wrapper定义别名,不能使用其他的替换
-
isEmptyOfWhere
public boolean isEmptyOfWhere()查询条件为空(包含entity) -
isNonEmptyOfWhere
public boolean isNonEmptyOfWhere()查询条件不为空(包含entity) -
nonEmptyOfWhere
已过时。 -
isEmptyOfNormal
public boolean isEmptyOfNormal()查询条件为空(不包含entity) -
isNonEmptyOfNormal
public boolean isNonEmptyOfNormal()查询条件为空(不包含entity) -
nonEmptyOfNormal
已过时。 -
isNonEmptyOfEntity
public boolean isNonEmptyOfEntity()深层实体判断属性- 返回:
- true 不为空
-
nonEmptyOfEntity
已过时。 -
isEmptyOfEntity
public boolean isEmptyOfEntity()深层实体判断属性- 返回:
- true 为空
-
getTargetSql
获取格式化后的执行sql- 返回:
- sql
- 从以下版本开始:
- 3.3.1
-
clear
public abstract void clear()条件清空- 从以下版本开始:
- 3.3.1
-