public interface IBaseDao<Entity,ID>
| 限定符和类型 | 方法和说明 |
|---|---|
Collection<Entity> |
batchInsert(List<Entity> list)
数据批量插入
|
long |
delete(Entity entity)
根据对象属性进行删除
|
long |
deleteByExample(Example example)
根据Example条件删除数据
|
long |
deleteById(ID id)
根据主键进行删除
|
List<Entity> |
find(Entity entity)
根据对象属性获取满足列表
|
List<Entity> |
findAll()
查询全部结果
|
List<Entity> |
findByExample(Example example)
根据Example条件进行查询
|
Entity |
findById(ID id)
根据主键查询
|
Entity |
findOne(Entity entity)
根据对象属性进行查询
|
Entity |
insert(Entity entity)
数据持久化
|
long |
updateByExample(Entity entity,
Example example)
根据Example条件更新实体`record`包含的全部属性,null值会被更新
|
long |
updateByExampleSelective(Entity entity,
Example example)
根据Example条件更新实体`record`包含的不是null的属性值
|
long |
updateById(Entity entity)
根据主键ID进行更新
|
long |
updateByIdSelective(Entity entity)
根据Example条件更新实体`record`包含的不是null的属性值
|
Collection<Entity> batchInsert(List<Entity> list)
list - long updateById(Entity entity)
entity - 需要更新对象long updateByIdSelective(Entity entity)
entity - 需要更新对象long updateByExample(Entity entity, Example example)
entity - example - long updateByExampleSelective(Entity entity, Example example)
entity - example - long deleteById(ID id)
id - 主键IDlong deleteByExample(Example example)
example - long delete(Entity entity)
entity - Copyright © 2023. All rights reserved.