public abstract class AbstractUpdateLambda<R,T,P> extends BasicQueryCompare<R,T,P> implements UpdateExecute<R,T>
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<String,ColumnMapping> |
allowUpdateProperties |
protected Map<String,Object> |
updateValueMap |
queryParam, queryTemplatedbType| 构造器和说明 |
|---|
AbstractUpdateLambda(Class<?> exampleType,
TableMapping<?> tableMapping,
LambdaTemplate jdbcTemplate) |
| 限定符和类型 | 方法和说明 |
|---|---|
R |
allowEmptyWhere()
允许空 Where条件(注意:空 Where 条件会导致更新整个数据库)
|
protected BoundSql |
buildBoundSql(SqlDialect dialect) |
int |
doUpdate()
生成 select count() 查询语句并查询总数。
|
R |
updateByMap(Map<String,Object> newValue)
更新数据
|
R |
updateBySample(T newValue)
更新数据,sample 对象中为空的属性不会参与更新
|
R |
updateTo(T newValue)
更新数据,map key 为列名
|
protected R |
updateToByCondition(Predicate<String> propertyTester,
Function<String,Object> propertyReader) |
addCondition, and, apply, between, eq, format, formatLikeValue, formatSegment, formatValue, ge, gt, in, isNotNull, isNull, le, like, likeLeft, likeRight, lockCondition, lt, ne, nested, notBetween, notIn, notLike, notLikeLeft, notLikeRight, orbuildColumnByLambda, buildColumnByProperty, dialect, exampleIsMap, exampleType, getBoundSql, getBoundSql, getJdbcTemplate, getPropertyName, getSelf, getTableMapping, isQualifier, setDialect, useQualifierclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBoundSql, getBoundSqland, orprotected final Map<String,ColumnMapping> allowUpdateProperties
public AbstractUpdateLambda(Class<?> exampleType, TableMapping<?> tableMapping, LambdaTemplate jdbcTemplate)
public R allowEmptyWhere()
UpdateExecuteallowEmptyWhere 在接口中 UpdateExecute<R,T>public int doUpdate()
throws SQLException
UpdateExecutedoUpdate 在接口中 UpdateExecute<R,T>SQLExceptionpublic R updateBySample(T newValue)
UpdateExecuteupdateBySample 在接口中 UpdateExecute<R,T>public R updateByMap(Map<String,Object> newValue)
UpdateExecuteupdateByMap 在接口中 UpdateExecute<R,T>public R updateTo(T newValue)
UpdateExecuteupdateTo 在接口中 UpdateExecute<R,T>protected R updateToByCondition(Predicate<String> propertyTester, Function<String,Object> propertyReader)
protected BoundSql buildBoundSql(SqlDialect dialect)
buildBoundSql 在类中 BasicLambda<R,T,P>Copyright © 2021–2022. All rights reserved.