public abstract class WarmServiceImpl<M extends WarmDao<T>,T> extends Object implements IWarmService<T>
| Constructor and Description |
|---|
WarmServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
Boolean |
exists(T entity)
判断是否存在
|
T |
getById(Serializable id)
根据id查询
|
List<T> |
getByIds(Collection<? extends Serializable> ids)
根据ids查询
|
M |
getDao() |
T |
getOne(T entity)
查询一条记录
|
void |
insertFill(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)
获取总数量
|
protected abstract IWarmService<T> |
setDao(M warmDao) |
void |
updateBatch(List<T> list)
批量更新
|
boolean |
updateById(T entity)
根据id修改
|
void |
updateFill(T entity) |
public WarmServiceImpl()
public M getDao()
getDao in interface IWarmService<T>protected abstract IWarmService<T> setDao(M warmDao)
public T getById(Serializable id)
IWarmServicegetById in interface IWarmService<T>id - 主键public List<T> getByIds(Collection<? extends Serializable> ids)
IWarmServicegetByIds in interface IWarmService<T>ids - 主键public Page<T> page(T entity, Page<T> page)
IWarmServicepage in interface IWarmService<T>entity - 查询实体page - 分页对象public List<T> list(T entity)
IWarmServicelist in interface IWarmService<T>entity - 查询实体public List<T> list(T entity, WarmQuery<T> query)
IWarmServicelist in interface IWarmService<T>entity - 查询实体public T getOne(T entity)
IWarmServicegetOne in interface IWarmService<T>entity - 查询实体public long selectCount(T entity)
IWarmServiceselectCount in interface IWarmService<T>entity - 查询实体public Boolean exists(T entity)
IWarmServiceexists in interface IWarmService<T>entity - 查询实体public boolean save(T entity)
IWarmServicesave in interface IWarmService<T>entity - 实体public boolean updateById(T entity)
IWarmServiceupdateById in interface IWarmService<T>entity - 实体public boolean removeById(Serializable id)
IWarmServiceremoveById in interface IWarmService<T>id - 主键public boolean remove(T entity)
IWarmServiceremove in interface IWarmService<T>entity - 实体public boolean removeByIds(Collection<? extends Serializable> ids)
IWarmServiceremoveByIds in interface IWarmService<T>ids - 需要删除的数据主键集合public void saveBatch(List<T> list)
IWarmServicesaveBatch in interface IWarmService<T>list - 实体集合public void saveBatch(List<T> list, int batchSize)
IWarmServicesaveBatch in interface IWarmService<T>list - 需要插入的集合数据batchSize - 插入大小public void updateBatch(List<T> list)
IWarmServiceupdateBatch in interface IWarmService<T>list - 集合数据public WarmQuery<T> orderById()
IWarmServiceorderById in interface IWarmService<T>public WarmQuery<T> orderByCreateTime()
IWarmServiceorderByCreateTime in interface IWarmService<T>public WarmQuery<T> orderByUpdateTime()
IWarmServiceorderByUpdateTime in interface IWarmService<T>public WarmQuery<T> orderByAsc(String orderByField)
IWarmServiceorderByAsc in interface IWarmService<T>orderByField - 排序字段public WarmQuery<T> orderByDesc(String orderByField)
IWarmServiceorderByDesc in interface IWarmService<T>orderByField - 排序字段public WarmQuery<T> orderBy(String orderByField)
IWarmServiceorderBy in interface IWarmService<T>orderByField - 排序字段public void insertFill(T entity)
public void updateFill(T entity)
Copyright © 2024. All rights reserved.