类 CrudRepository<M extends com.baomidou.mybatisplus.core.mapper.BaseMapper<T>,T>

java.lang.Object
com.baomidou.mybatisplus.extension.repository.AbstractRepository<M,T>
com.baomidou.mybatisplus.extension.repository.CrudRepository<M,T>
所有已实现的接口:
com.baomidou.mybatisplus.extension.repository.IRepository<T>
直接已知子类:
ServiceImpl

public abstract class CrudRepository<M extends com.baomidou.mybatisplus.core.mapper.BaseMapper<T>,T> extends com.baomidou.mybatisplus.extension.repository.AbstractRepository<M,T>
IService 实现类( 泛型:M 是 mapper 对象,T 是实体 )
从以下版本开始:
2018-06-23
作者:
hubin
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    protected M
     

    从类继承的字段 com.baomidou.mybatisplus.extension.repository.AbstractRepository

    log

    从接口继承的字段 com.baomidou.mybatisplus.extension.repository.IRepository

    DEFAULT_BATCH_SIZE
  • 构造器概要

    构造器
    构造器
    说明
     
  • 方法概要

    修饰符和类型
    方法
    说明
     
    protected String
    getSqlStatement(com.baomidou.mybatisplus.core.enums.SqlMethod sqlMethod)
    获取mapperStatementId
    boolean
    saveBatch(Collection<T> entityList, int batchSize)
    批量插入
    boolean
    saveOrUpdateBatch(Collection<T> entityList, int batchSize)
     
    boolean
    updateBatchById(Collection<T> entityList, int batchSize)
     

    从类继承的方法 com.baomidou.mybatisplus.extension.repository.AbstractRepository

    executeBatch, executeBatch, getEntityClass, getMap, getMapperClass, getObj, getOne, getOneOpt, getSqlSessionFactory, removeById, saveOrUpdate

    从类继承的方法 java.lang.Object

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

    从接口继承的方法 com.baomidou.mybatisplus.extension.repository.IRepository

    count, count, exists, getById, getOne, getOneOpt, getOptById, ktQuery, ktUpdate, lambdaQuery, lambdaQuery, lambdaUpdate, list, list, list, list, listByIds, listByMap, listMaps, listMaps, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeById, removeById, removeByIds, removeByIds, removeByMap, save, update, update, update, updateById
  • 字段详细资料

    • baseMapper

      @Autowired protected M extends com.baomidou.mybatisplus.core.mapper.BaseMapper<T> baseMapper
  • 构造器详细资料

    • CrudRepository

      public CrudRepository()
  • 方法详细资料

    • getBaseMapper

      public M getBaseMapper()
    • saveBatch

      @Transactional(rollbackFor=java.lang.Exception.class) public boolean saveBatch(Collection<T> entityList, int batchSize)
      批量插入
      参数:
      entityList - ignore
      batchSize - ignore
      返回:
      ignore
    • getSqlStatement

      protected String getSqlStatement(com.baomidou.mybatisplus.core.enums.SqlMethod sqlMethod)
      获取mapperStatementId
      参数:
      sqlMethod - 方法名
      返回:
      命名id
      从以下版本开始:
      3.4.0
    • saveOrUpdateBatch

      @Transactional(rollbackFor=java.lang.Exception.class) public boolean saveOrUpdateBatch(Collection<T> entityList, int batchSize)
    • updateBatchById

      @Transactional(rollbackFor=java.lang.Exception.class) public boolean updateBatchById(Collection<T> entityList, int batchSize)