S - 更新器public abstract class UpdateBase<S extends UpdateBase<S,U>,U extends IBaseUpdate<?,U,?>> extends BaseSegment<UpdateApply<S,U>,U>
| 限定符和类型 | 字段和说明 |
|---|---|
S |
set |
current, wrapper| 限定符 | 构造器和说明 |
|---|---|
protected |
UpdateBase(U updater) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected UpdateApply<S,U> |
apply() |
<E extends IEntity> |
byEntity(E entity,
GetterFunc<E> getter,
GetterFunc<E>... getters)
根据entity值更新
o 指定字段列表, 可以是 null 值
o 无指定字段时, 除主键外的非空entity字段
|
S |
byEntity(IEntity entity,
FieldMapping column,
FieldMapping... columns)
根据entity值更新
o 指定字段列表, 可以是 null 值
o 无指定字段时, 除主键外的非空entity字段
|
S |
byEntity(IEntity entity,
String... columns)
根据entity值更新
o 指定字段列表, 可以是 null 值
o 无指定字段时, 除主键外的非空entity字段
|
<E extends IEntity> |
byExclude(E entity,
GetterFunc<E> exclude,
GetterFunc<E>... excludes)
根据entity字段(包括null字段), 但排除指定字段
|
S |
byExclude(IEntity entity,
FieldMapping exclude,
FieldMapping... excludes)
根据entity字段(包括null字段), 但排除指定字段
|
S |
byExclude(IEntity entity,
String... excludes)
更新除指定的排除字段外其它entity字段值(包括null字段)
无排除字段时, 更新除主键外其它字段(包括null值字段)
|
S |
byNotNull(Map<String,Object> values)
按照values中非null值更新记录
|
byEntity, byExclude, columnWithAlias, currentWithAlias, end, fieldMapping, get, setpublic final S extends UpdateBase<S,U> set
protected UpdateBase(U updater)
public S byNotNull(Map<String,Object> values)
values - key-value条件public S byEntity(IEntity entity, FieldMapping column, FieldMapping... columns)
o 指定字段列表, 可以是 null 值 o 无指定字段时, 除主键外的非空entity字段
entity - 实例columns - 要更新的字段public <E extends IEntity> S byEntity(E entity, GetterFunc<E> getter, GetterFunc<E>... getters)
o 指定字段列表, 可以是 null 值 o 无指定字段时, 除主键外的非空entity字段
entity - 实例getters - 要更新的字段, Entity::getter函数public S byEntity(IEntity entity, String... columns)
o 指定字段列表, 可以是 null 值 o 无指定字段时, 除主键外的非空entity字段
entity - 实例columns - 要更新的字段public S byExclude(IEntity entity, FieldMapping exclude, FieldMapping... excludes)
entity - 实例excludes - 排除更新的字段public <E extends IEntity> S byExclude(E entity, GetterFunc<E> exclude, GetterFunc<E>... excludes)
entity - 实例excludes - 排除更新的字段, Entity::getter函数public S byExclude(IEntity entity, String... excludes)
无排除字段时, 更新除主键外其它字段(包括null值字段)
entity - 实例excludes - 排除更新的字段protected UpdateApply<S,U> apply()
apply 在类中 BaseSegment<UpdateApply<S extends UpdateBase<S,U>,U extends IBaseUpdate<?,U,?>>,U extends IBaseUpdate<?,U,?>>Copyright © 2021. All rights reserved.