public interface IService<T>
顶级 Service
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
delete(Wrapper<T> wrapper)
根据 entity 条件,删除记录
|
boolean |
deleteBatchIds(List<? extends Serializable> idList)
删除(根据ID 批量删除)
|
boolean |
deleteById(Serializable id)
根据 ID 删除
|
boolean |
deleteByMap(Map<String,Object> columnMap)
根据 columnMap 条件,删除记录
|
boolean |
insert(T entity)
插入一条记录(选择字段,策略插入)
|
boolean |
insertAllColumn(T entity)
插入一条记录(全部字段)
|
boolean |
insertBatch(List<T> entityList)
插入(批量),该方法不适合 Oracle
|
boolean |
insertBatch(List<T> entityList,
int batchSize)
插入(批量)
|
boolean |
insertOrUpdate(T entity)
TableId 注解存在更新记录,否插入一条记录
|
boolean |
insertOrUpdateAllColumn(T entity)
插入或修改一条记录的全部字段
|
boolean |
insertOrUpdateAllColumnBatch(List<T> entityList)
批量修改或插入全部字段
|
boolean |
insertOrUpdateAllColumnBatch(List<T> entityList,
int batchSize)
批量修改或插入全部字段
|
boolean |
insertOrUpdateBatch(List<T> entityList)
批量修改插入
|
boolean |
insertOrUpdateBatch(List<T> entityList,
int batchSize)
批量修改插入
|
List<T> |
selectBatchIds(List<? extends Serializable> idList)
查询(根据ID 批量查询)
|
T |
selectById(Serializable id)
根据 ID 查询
|
List<T> |
selectByMap(Map<String,Object> columnMap)
查询(根据 columnMap 条件)
|
int |
selectCount(Wrapper<T> wrapper)
根据 Wrapper 条件,查询总记录数
|
List<T> |
selectList(Wrapper<T> wrapper)
查询列表
|
Map<String,Object> |
selectMap(Wrapper<T> wrapper)
根据 Wrapper,查询一条记录
|
List<Map<String,Object>> |
selectMaps(Wrapper<T> wrapper)
查询列表
|
Page<Map<String,Object>> |
selectMapsPage(Page page,
Wrapper<T> wrapper)
翻页查询
|
Object |
selectObj(Wrapper<T> wrapper)
根据 Wrapper,查询一条记录
|
List<Object> |
selectObjs(Wrapper<T> wrapper)
根据 Wrapper 条件,查询全部记录
|
T |
selectOne(Wrapper<T> wrapper)
根据 Wrapper,查询一条记录
|
Page<T> |
selectPage(Page<T> page)
翻页查询
|
Page<T> |
selectPage(Page<T> page,
Wrapper<T> wrapper)
翻页查询
|
boolean |
update(T entity,
Wrapper<T> wrapper)
根据 whereEntity 条件,更新记录
|
boolean |
updateAllColumnBatchById(List<T> entityList)
根据ID 批量更新全部字段
|
boolean |
updateAllColumnBatchById(List<T> entityList,
int batchSize)
根据ID 批量更新全部字段
|
boolean |
updateAllColumnById(T entity)
根据 ID 修改全部字段
|
boolean |
updateBatchById(List<T> entityList)
根据ID 批量更新
|
boolean |
updateBatchById(List<T> entityList,
int batchSize)
根据ID 批量更新
|
boolean |
updateById(T entity)
根据 ID 选择修改
|
boolean insert(T entity)
插入一条记录(选择字段,策略插入)
entity - 实体对象boolean insertAllColumn(T entity)
插入一条记录(全部字段)
entity - 实体对象boolean insertBatch(List<T> entityList)
插入(批量),该方法不适合 Oracle
entityList - 实体对象列表boolean insertBatch(List<T> entityList, int batchSize)
插入(批量)
entityList - 实体对象列表batchSize - 插入批次数量boolean insertOrUpdateBatch(List<T> entityList)
批量修改插入
entityList - 实体对象列表boolean insertOrUpdateBatch(List<T> entityList, int batchSize)
批量修改插入
entityList - 实体对象列表batchSize - boolean insertOrUpdateAllColumnBatch(List<T> entityList)
批量修改或插入全部字段
entityList - 实体对象列表boolean insertOrUpdateAllColumnBatch(List<T> entityList, int batchSize)
entityList - 实体对象列表batchSize - boolean deleteById(Serializable id)
根据 ID 删除
id - 主键IDboolean deleteByMap(Map<String,Object> columnMap)
根据 columnMap 条件,删除记录
columnMap - 表字段 map 对象boolean deleteBatchIds(List<? extends Serializable> idList)
删除(根据ID 批量删除)
idList - 主键ID列表boolean updateById(T entity)
根据 ID 选择修改
entity - 实体对象boolean updateAllColumnById(T entity)
根据 ID 修改全部字段
entity - 实体对象boolean update(T entity, Wrapper<T> wrapper)
根据 whereEntity 条件,更新记录
entity - 实体对象wrapper - 实体包装类 Wrapperboolean updateBatchById(List<T> entityList)
根据ID 批量更新
entityList - 实体对象列表boolean updateBatchById(List<T> entityList, int batchSize)
根据ID 批量更新
entityList - 实体对象列表batchSize - 更新批次数量boolean updateAllColumnBatchById(List<T> entityList)
根据ID 批量更新全部字段
entityList - 实体对象列表boolean updateAllColumnBatchById(List<T> entityList, int batchSize)
根据ID 批量更新全部字段
entityList - 实体对象列表batchSize - 更新批次数量boolean insertOrUpdate(T entity)
TableId 注解存在更新记录,否插入一条记录
entity - 实体对象boolean insertOrUpdateAllColumn(T entity)
entity - 实体对象T selectById(Serializable id)
根据 ID 查询
id - 主键IDList<T> selectBatchIds(List<? extends Serializable> idList)
查询(根据ID 批量查询)
idList - 主键ID列表List<T> selectByMap(Map<String,Object> columnMap)
查询(根据 columnMap 条件)
columnMap - 表字段 map 对象Map<String,Object> selectMap(Wrapper<T> wrapper)
根据 Wrapper,查询一条记录
wrapper - WrapperList<Object> selectObjs(Wrapper<T> wrapper)
根据 Wrapper 条件,查询全部记录
wrapper - 实体对象封装操作类(可以为 null)Page<Map<String,Object>> selectMapsPage(Page page, Wrapper<T> wrapper)
翻页查询
page - 翻页对象wrapper - WrapperCopyright © 2017. All rights reserved.