public class LambdaUpdateWrapper<T> extends AbstractQueryCompare<T,LambdaOperations.LambdaUpdate<T>> implements LambdaOperations.LambdaUpdate<T>
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,ColumnMapping> |
allowUpdateProperties |
protected Map<String,Object> |
updateValueMap |
queryParam, queryTemplatedbType| 构造器和说明 |
|---|
LambdaUpdateWrapper(TableMapping<T> tableMapping,
LambdaTemplate jdbcTemplate) |
| 限定符和类型 | 方法和说明 |
|---|---|
UpdateExecute<T> |
allowEmptyWhere()
允许空 Where条件(注意:空 Where 条件会导致更新整个数据库)
|
int |
doUpdate()
生成 select count() 查询语句并查询总数。
|
BoundSql |
getOriginalBoundSql() |
protected LambdaOperations.LambdaUpdate<T> |
getSelf() |
protected boolean |
supportPage()
由于 pageInfo 是在高层 QueryExecute 实现中提供的能力,因此提供一个开关。
|
UpdateExecute<T> |
updateByColumn(Collection<String> setColumns,
T newValue)
更新数据,map key 为列名
|
UpdateExecute<T> |
updateByColumn(Map<String,Object> newValue)
更新数据,map key 为列名
|
UpdateExecute<T> |
updateBySample(T sample)
sample 中不为空的属性作为 set 的值
|
protected UpdateExecute<T> |
updateTo(Predicate<ColumnMapping> tester,
Function<ColumnMapping,Object> propertyReader) |
UpdateExecute<T> |
updateTo(T newValue)
所有属性都作为 set 的值
|
LambdaOperations.LambdaUpdate<T> |
useQualifier() |
addCondition, and, apply, between, between, conditionName, eq, eq, fmtColumn, format, formatSegment, ge, ge, gt, gt, in, in, isNotNull, isNotNull, isNull, isNull, le, le, like, like, likeLeft, likeLeft, likeRight, likeRight, lockCondition, lt, lt, ne, ne, nested, notBetween, notBetween, notIn, notIn, notLike, notLike, notLikeLeft, notLikeLeft, notLikeRight, notLikeRight, orgetBoundSql, getBoundSql, pageInfo, query, query, query, queryForCount, queryForLargeCount, queryForList, queryForMap, queryForMapList, queryForObject, wrapperTypebuildTabName, dialect, enableQualifier, exampleType, getJdbcTemplate, getTableMapping, isQualifier, setDialectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexampleTypegetBoundSql, getBoundSqland, and, apply, between, between, eq, eq, ge, ge, gt, gt, in, in, isNotNull, isNotNull, isNull, isNull, le, le, like, like, likeLeft, likeLeft, likeRight, likeRight, lt, lt, ne, ne, nested, notBetween, notBetween, notIn, notIn, notLike, notLike, notLikeLeft, notLikeLeft, notLikeRight, notLikeRight, or, orwrapperTypeprotected final Map<String,ColumnMapping> allowUpdateProperties
public LambdaUpdateWrapper(TableMapping<T> tableMapping, LambdaTemplate jdbcTemplate)
protected boolean supportPage()
AbstractQueryExecutesupportPage 在类中 AbstractQueryExecute<T>protected LambdaOperations.LambdaUpdate<T> getSelf()
getSelf 在类中 AbstractQueryCompare<T,LambdaOperations.LambdaUpdate<T>>public LambdaOperations.LambdaUpdate<T> useQualifier()
useQualifier 在接口中 LambdaOperations.LambdaCommon<UpdateExecute<T>,T>public UpdateExecute<T> allowEmptyWhere()
UpdateExecuteallowEmptyWhere 在接口中 UpdateExecute<T>public UpdateExecute<T> updateByColumn(Map<String,Object> newValue)
UpdateExecuteupdateByColumn 在接口中 UpdateExecute<T>public UpdateExecute<T> updateByColumn(Collection<String> setColumns, T newValue)
UpdateExecuteupdateByColumn 在接口中 UpdateExecute<T>public UpdateExecute<T> updateTo(T newValue)
UpdateExecuteupdateTo 在接口中 UpdateExecute<T>public UpdateExecute<T> updateBySample(T sample)
UpdateExecuteupdateBySample 在接口中 UpdateExecute<T>protected UpdateExecute<T> updateTo(Predicate<ColumnMapping> tester, Function<ColumnMapping,Object> propertyReader)
public BoundSql getOriginalBoundSql()
public int doUpdate()
throws SQLException
UpdateExecutedoUpdate 在接口中 UpdateExecute<T>SQLExceptionCopyright © 2021. All rights reserved.