Class BaseDAO<T extends IEntity<I>,I,M extends org.springframework.data.jpa.repository.JpaRepository<T,I> & org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>>

java.lang.Object
io.github.xezzon.zeroweb.common.jpa.BaseDAO<T,I,M>
Type Parameters:
T - 实体类型
I - ID类型
M - 实体操作类类型
All Implemented Interfaces:
io.github.xezzon.tao.trait.NewType<M>

public abstract class BaseDAO<T extends IEntity<I>,I,M extends org.springframework.data.jpa.repository.JpaRepository<T,I> & org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>> extends Object implements io.github.xezzon.tao.trait.NewType<M>
Author:
xezzon
  • Method Details

    • getCopier

      public abstract BaseDAO.ICopier<T> getCopier()
    • get

      public M get()
      Specified by:
      get in interface io.github.xezzon.tao.trait.NewType<T extends IEntity<I>>
    • partialUpdate

      public T partialUpdate(T target)
      局部更新实体(仅更新非空字段)
      Parameters:
      target - 目标实体
      Returns:
      更新后的实体
    • findAll

      public org.springframework.data.domain.Page<T> findAll(ODataQueryOption odata)
      分页查询数据
      Parameters:
      odata - OData查询条件
      Returns:
      分页数据