T - 实体类类型public abstract class Model<T extends Model<T>> extends QueryModel<T> implements MapperModel<T>, MapperQueryChain<T>, Serializable
| 构造器和说明 |
|---|
Model() |
| 限定符和类型 | 方法和说明 |
|---|---|
BaseMapper<T> |
baseMapper()
获取实体类对应的
BaseMapper 接口。 |
boolean |
remove()
根据实体类构建的条件删除数据。
|
Optional<T> |
removeOpt()
|
QueryWrapper |
toQueryWrapper()
将该实现类转换为
QueryWrapper 对象。 |
boolean |
update()
根据实体类构建的条件更新数据(自动忽略
null 值)。 |
boolean |
update(boolean ignoreNulls)
根据实体类构建的条件更新数据,并设置是否忽略
null 值。 |
Optional<T> |
updateOpt()
|
Optional<T> |
updateOpt(boolean ignoreNulls)
根据实体类构建的条件更新数据,并设置是否忽略
null 值,结果使用 Optional
返回源对象回调,更新成功返回 Optional.of(this),更新失败返回
Optional.empty()。 |
FieldsQuery<T> |
withFields()
使用
Fields Query 的方式进行关联查询。 |
RelationsQuery<T> |
withRelations()
使用
Relations Query 的方式进行关联查询。 |
RelationsBuilder<T> |
withRelations(LambdaGetter<T>... columns)
使用 Relations Query 的方式进行关联查询。
|
and, and, and, and, as, crossJoin, crossJoin, crossJoin, crossJoin, crossJoin, crossJoin, crossJoin, crossJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, fullJoin, groupBy, groupBy, groupBy, having, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, innerJoin, join, join, join, join, join, join, join, join, joins, joins, joins, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, leftJoin, limit, limit, offset, or, or, or, or, orderBy, orderBy, orderBy, orderBy, orderBy, orderBy, queryWrapper, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, rightJoin, select, select, select, select, select, select, where, where, where, whereclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitoneById, oneByIdOpt, pkValue, removeById, removeByIdOpt, save, save, saveOpt, saveOpt, saveOrUpdate, saveOrUpdate, saveOrUpdateOpt, saveOrUpdateOpt, updateById, updateById, updateByIdOpt, updateByIdOptcount, exists, list, listAs, obj, objAs, objAsOpt, objList, objListAs, objOpt, one, oneAs, page, pageAsoneAsOpt, oneOptpublic Model()
public boolean remove()
true 删除成功,false 删除失败public boolean update()
null 值)。true 更新成功,false 更新失败public boolean update(boolean ignoreNulls)
null 值。ignoreNulls - 是否忽略 null 值true 更新成功,false 更新失败public Optional<T> updateOpt(boolean ignoreNulls)
null 值,结果使用 Optional
返回源对象回调,更新成功返回 Optional.of(this),更新失败返回
Optional.empty()。ignoreNulls - 是否忽略 null 值Optional 链式调用public BaseMapper<T> baseMapper()
MapperModelBaseMapper 接口。baseMapper 在接口中 MapperModel<T extends Model<T>>baseMapper 在接口中 MapperQueryChain<T extends Model<T>>BaseMapper 接口public QueryWrapper toQueryWrapper()
MapperQueryChainQueryWrapper 对象。toQueryWrapper 在接口中 MapperQueryChain<T extends Model<T>>QueryWrapperpublic FieldsQuery<T> withFields()
MapperQueryChainFields Query 的方式进行关联查询。withFields 在接口中 MapperQueryChain<T extends Model<T>>Fields Query 查询public RelationsQuery<T> withRelations()
MapperQueryChainRelations Query 的方式进行关联查询。withRelations 在接口中 MapperQueryChain<T extends Model<T>>Relations Query 查询public RelationsBuilder<T> withRelations(LambdaGetter<T>... columns)
MapperQueryChainwithRelations 在接口中 MapperQueryChain<T extends Model<T>>columns - 需要关联的字段Copyright © 2024. All rights reserved.