Class WarmDaoImpl<T extends JPARootEntity<T>>

java.lang.Object
org.dromara.warm.flow.orm.dao.WarmDaoImpl<T>
All Implemented Interfaces:
org.dromara.warm.flow.core.orm.dao.WarmDao<T>
Direct Known Subclasses:
FlowDefinitionDaoImpl, FlowFormDaoImpl, FlowHisTaskDaoImpl, FlowInstanceDaoImpl, FlowNodeDaoImpl, FlowSkipDaoImpl, FlowTaskDaoImpl, FlowUserDaoImpl

public abstract class WarmDaoImpl<T extends JPARootEntity<T>> extends Object implements org.dromara.warm.flow.core.orm.dao.WarmDao<T>
BaseMapper接口
Since:
2024-05-12
Author:
vanlin
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected javax.persistence.EntityManager
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected javax.persistence.criteria.CriteriaQuery<Long>
    createCriteriaCountQuery(JPAPredicateFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>> predicateFunction)
     
    protected javax.persistence.criteria.CriteriaDelete<T>
    createCriteriaDelete(JPAPredicateFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>> predicateFunction)
     
    protected javax.persistence.criteria.CriteriaQuery<T>
    createCriteriaQuery(JPAQueryFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>,javax.persistence.criteria.CriteriaQuery<T>> orderByQueryFunction)
     
    protected javax.persistence.criteria.CriteriaUpdate<T>
    createCriteriaUpdate(JPAUpdateFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>,javax.persistence.criteria.CriteriaUpdate<T>> updateFunction)
     
    protected <F extends Serializable>
    javax.persistence.criteria.CriteriaBuilder.In<F>
    createIn(javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<T> root, String fieldName, F[] values)
     
    protected <F extends Serializable>
    javax.persistence.criteria.CriteriaBuilder.In<F>
    createIn(javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<T> root, String fieldName, Collection<F> values)
     
    int
    delete(T entity)
     
    int
     
    int
     
    abstract Class<T>
     
    protected void
    orderBy(javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<T> criteriaQuery, T entity, org.dromara.warm.flow.core.utils.page.OrderBy orderBy)
     
    int
    save(T entity)
     
    void
    saveBatch(List<T> list)
     
    根据id查询
    根据ids查询
    long
    selectCount(T entity)
     
    selectList(T entity, org.dromara.warm.flow.core.orm.agent.WarmQuery<T> query)
     
    org.dromara.warm.flow.core.utils.page.Page<T>
    selectPage(T entity, org.dromara.warm.flow.core.utils.page.Page<T> page)
     
    void
     
    int
    updateById(T entity)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.dromara.warm.flow.core.orm.dao.WarmDao

    newEntity
  • Field Details

    • entityManager

      protected javax.persistence.EntityManager entityManager
  • Constructor Details

    • WarmDaoImpl

      public WarmDaoImpl()
  • Method Details

    • entityClass

      public abstract Class<T> entityClass()
    • selectById

      public T selectById(Serializable id)
      根据id查询
      Specified by:
      selectById in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
      Parameters:
      id - 主键
      Returns:
      实体
    • selectByIds

      public List<T> selectByIds(Collection<? extends Serializable> ids)
      根据ids查询
      Specified by:
      selectByIds in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
      Parameters:
      ids - 主键
      Returns:
      实体
    • selectPage

      public org.dromara.warm.flow.core.utils.page.Page<T> selectPage(T entity, org.dromara.warm.flow.core.utils.page.Page<T> page)
      Specified by:
      selectPage in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • selectList

      public List<T> selectList(T entity, org.dromara.warm.flow.core.orm.agent.WarmQuery<T> query)
      Specified by:
      selectList in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • selectCount

      public long selectCount(T entity)
      Specified by:
      selectCount in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • save

      public int save(T entity)
      Specified by:
      save in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • updateById

      public int updateById(T entity)
      Specified by:
      updateById in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • delete

      public int delete(T entity)
      Specified by:
      delete in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • deleteById

      public int deleteById(Serializable id)
      Specified by:
      deleteById in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • saveBatch

      public void saveBatch(List<T> list)
      Specified by:
      saveBatch in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • updateBatch

      public void updateBatch(List<T> list)
      Specified by:
      updateBatch in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • deleteByIds

      public int deleteByIds(Collection<? extends Serializable> ids)
      Specified by:
      deleteByIds in interface org.dromara.warm.flow.core.orm.dao.WarmDao<T extends JPARootEntity<T>>
    • createCriteriaQuery

      protected javax.persistence.criteria.CriteriaQuery<T> createCriteriaQuery(JPAQueryFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>,javax.persistence.criteria.CriteriaQuery<T>> orderByQueryFunction)
    • createCriteriaCountQuery

      protected javax.persistence.criteria.CriteriaQuery<Long> createCriteriaCountQuery(JPAPredicateFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>> predicateFunction)
    • orderBy

      protected void orderBy(javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<T> root, javax.persistence.criteria.CriteriaQuery<T> criteriaQuery, T entity, org.dromara.warm.flow.core.utils.page.OrderBy orderBy)
    • createIn

      protected <F extends Serializable> javax.persistence.criteria.CriteriaBuilder.In<F> createIn(javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<T> root, String fieldName, Collection<F> values)
    • createIn

      protected <F extends Serializable> javax.persistence.criteria.CriteriaBuilder.In<F> createIn(javax.persistence.criteria.CriteriaBuilder criteriaBuilder, javax.persistence.criteria.Root<T> root, String fieldName, F[] values)
    • createCriteriaUpdate

      protected javax.persistence.criteria.CriteriaUpdate<T> createCriteriaUpdate(JPAUpdateFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>,javax.persistence.criteria.CriteriaUpdate<T>> updateFunction)
    • createCriteriaDelete

      protected javax.persistence.criteria.CriteriaDelete<T> createCriteriaDelete(JPAPredicateFunction<javax.persistence.criteria.CriteriaBuilder,javax.persistence.criteria.Root<T>,List<javax.persistence.criteria.Predicate>> predicateFunction)