public interface IWarmService<T>
| Modifier and Type | Method and Description |
|---|---|
Boolean |
exists(T entity)
判断是否存在
|
T |
getById(Serializable id)
根据id查询
|
List<T> |
getByIds(Collection<? extends Serializable> ids)
根据ids查询
|
<M extends WarmDao<T>> |
getDao() |
T |
getOne(T entity)
查询一条记录
|
List<T> |
list(T entity)
查询列表
|
List<T> |
list(T entity,
WarmQuery<T> query)
查询列表,可排序
|
WarmQuery<T> |
orderBy(String orderByField)
用户自定义排序方案
|
WarmQuery<T> |
orderByAsc(String orderByField)
设置正序排列
|
WarmQuery<T> |
orderByCreateTime()
创建时间设置正序排列
|
WarmQuery<T> |
orderByDesc(String orderByField)
设置倒序排列
|
WarmQuery<T> |
orderById()
id设置正序排列
|
WarmQuery<T> |
orderByUpdateTime()
更新时间设置正序排列
|
Page<T> |
page(T entity,
Page<T> page)
分页查询
|
boolean |
remove(T entity)
根据entity删除
|
boolean |
removeById(Serializable id)
根据id删除
|
boolean |
removeByIds(Collection<? extends Serializable> ids)
根据ids批量删除
|
boolean |
save(T entity)
新增
|
void |
saveBatch(List<T> list)
批量新增
|
void |
saveBatch(List<T> list,
int batchSize)
批量新增
|
long |
selectCount(T entity)
获取总数量
|
void |
updateBatch(List<T> list)
批量更新
|
boolean |
updateById(T entity)
根据id修改
|
T getById(Serializable id)
id - 主键List<T> getByIds(Collection<? extends Serializable> ids)
ids - 主键List<T> list(T entity, WarmQuery<T> query)
entity - 查询实体query - long selectCount(T entity)
entity - 查询实体boolean updateById(T entity)
entity - 实体boolean removeById(Serializable id)
id - 主键boolean removeByIds(Collection<? extends Serializable> ids)
ids - 需要删除的数据主键集合void saveBatch(List<T> list, int batchSize)
list - 需要插入的集合数据batchSize - 插入大小void updateBatch(List<T> list)
list - 集合数据WarmQuery<T> orderByCreateTime()
WarmQuery<T> orderByUpdateTime()
WarmQuery<T> orderByAsc(String orderByField)
orderByField - 排序字段WarmQuery<T> orderByDesc(String orderByField)
orderByField - 排序字段Copyright © 2024. All rights reserved.