类 BaseDaoImpl<R extends org.springframework.data.jpa.repository.JpaRepository<T,Integer>,T extends BaseEntity>
- java.lang.Object
-
- com.shixin.dal.dao.BaseDaoImpl<R,T>
-
- 所有已实现的接口:
BaseDao<T>
@NoRepositoryBean public abstract class BaseDaoImpl<R extends org.springframework.data.jpa.repository.JpaRepository<T,Integer>,T extends BaseEntity> extends Object implements BaseDao<T>
Dao层基础接口实现类- 作者:
- weizhiwen
-
-
字段概要
字段 修饰符和类型 字段 说明 protected Rrepository
-
构造器概要
构造器 构造器 说明 BaseDaoImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Tcreate(T t)创建对象List<T>createAll(List<T> list)批量创建对象voiddelete(T t)根据对象删除对象 默认逻辑删除voiddeleteById(Integer id)根据id删除对象 默认逻辑删除List<T>findAll()根据查询对象查找对象List<T>findAll(T t)根据查询对象查找对象TfindById(Integer id)根据id查找对象TfindOne(T t)根据查询对象查找对象org.springframework.data.domain.Page<T>pageQuery(T t, org.springframework.data.domain.Pageable pageable)分页查询Tupdate(T t)根据id更新对象,默认忽略Null值更新TupdateWithNull(T t)根据id更新对象,可以设置Null值是否更新
-
-
-
方法详细资料
-
updateWithNull
public T updateWithNull(T t)
从接口复制的说明:BaseDao根据id更新对象,可以设置Null值是否更新- 指定者:
updateWithNull在接口中BaseDao<R extends org.springframework.data.jpa.repository.JpaRepository<T,Integer>>- 参数:
t- 待更新对象- 返回:
- 更新后的对象
-
deleteById
public void deleteById(Integer id)
从接口复制的说明:BaseDao根据id删除对象 默认逻辑删除- 指定者:
deleteById在接口中BaseDao<R extends org.springframework.data.jpa.repository.JpaRepository<T,Integer>>- 参数:
id- 对象Id
-
pageQuery
public org.springframework.data.domain.Page<T> pageQuery(T t, org.springframework.data.domain.Pageable pageable)
从接口复制的说明:BaseDao分页查询
-
-