E - 实体类public abstract class BaseDaoImpl<E extends IEntity> extends DaoProtectedImpl<E> implements IBaseDao<E>
| 构造器和说明 |
|---|
BaseDaoImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
deleteByEntityIds(Collection<E> entities)
根据entities中的id值,批量删除记录
|
boolean |
deleteById(Serializable id)
根据id删除记录
|
int |
deleteByIds(Collection<? extends Serializable> ids)
根据ids列表批量删除记录
|
int |
deleteByMap(Map<String,Object> map)
根据map构造条件删除记录
|
boolean |
existPk(Serializable id)
判断主键id记录是否已经存在
|
<PK extends Serializable> |
save(E entity)
插入一条记录
|
int |
save(List<E> list)
批量插入
列表实例的主键必须全赋值,或者全不赋值
|
boolean |
saveOrUpdate(E entity)
根据主键判断记录是否已经存在
o 是:更新记录
o 否:插入记录
|
E |
selectById(Serializable id)
根据id查询
|
List<E> |
selectByIds(Collection<? extends Serializable> ids)
根据id列表查询
|
List<E> |
selectByMap(Map<String,Object> where)
根据where key值构造条件查询
|
boolean |
updateById(E entity)
根据entity的主键修改entity中非null属性
|
count, deleteBy, findOne, findOne, listEntity, listMaps, listObjs, listPoJos, markerPagedEntity, markerPagedMaps, markerPagedPoJos, pagedEntity, pagedMaps, pagedPoJos, updateByclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindPkColumn, mapper, query, updaterpublic <PK extends Serializable> PK save(E entity)
IBaseDaopublic boolean saveOrUpdate(E entity)
IBaseDao根据主键判断记录是否已经存在 o 是:更新记录 o 否:插入记录
saveOrUpdate 在接口中 IBaseDao<E extends IEntity>entity - 实体对象public E selectById(Serializable id)
IBaseDaoselectById 在接口中 IBaseDao<E extends IEntity>id - 主键值public List<E> selectByIds(Collection<? extends Serializable> ids)
IBaseDaoselectByIds 在接口中 IBaseDao<E extends IEntity>ids - 主键列表public List<E> selectByMap(Map<String,Object> where)
IBaseDaoselectByMap 在接口中 IBaseDao<E extends IEntity>where - 条件,忽略null值public boolean existPk(Serializable id)
IBaseDaopublic boolean updateById(E entity)
IBaseDaoupdateById 在接口中 IBaseDao<E extends IEntity>entity - 实体对象public int deleteByEntityIds(Collection<E> entities)
IBaseDaodeleteByEntityIds 在接口中 IBaseDao<E extends IEntity>public int deleteByIds(Collection<? extends Serializable> ids)
IBaseDaodeleteByIds 在接口中 IBaseDao<E extends IEntity>ids - 主键列表public boolean deleteById(Serializable id)
IBaseDaodeleteById 在接口中 IBaseDao<E extends IEntity>id - 主键值Copyright © 2020. All rights reserved.