Interface EntityInsertCmd<T>
- Type Parameters:
T- 实体类类型
- All Superinterfaces:
DaoSupplier, EntitySupplier<T>
- All Known Implementing Classes:
EntityDao
-
Method Summary
Modifier and TypeMethodDescriptiondefault int插入数据,若非record类型还会回填自增值(原主键值=null且标注Column(autoIncrement=true)), fill值(FillOnInsert(populate=true))default intinsertBatch(List<T> entities) 批量插入数据,batchSize由配置决定,不会对对象填充自增值default intinsertBatch(List<T> entities, int batchSize) 批量插入数据,不会对对象填充自增值default <S> intinsertBatchWith(List<S> sources) 批量插入数据通过源对象(VO,Req,DTO等,通过field匹配,需确保类型兼容),不回填数据,batchSize由配置决定default <S> intinsertBatchWith(List<S> sources, int batchSize) 批量插入数据通过源对象(VO,Req,DTO等,通过field匹配,需确保类型兼容),不回填数据default intinsertWith(Object source) 插入数据通过源对象(VO,Req,DTO等,通过field匹配,需确保类型兼容),不回填数据default intinsertWith(T entityDefault, Object source) 插入数据通过源对象(VO,Req,DTO等,通过field匹配,需确保类型兼容),不回填数据default intinsertWithMap(Map<String, Object> source) 插入数据通过源Map(将key当作field匹配,需确保值类型兼容)Methods inherited from interface DaoSupplier
daoMethods inherited from interface EntitySupplier
entityClass
-
Method Details
-
insert
插入数据,若非record类型还会回填自增值(原主键值=null且标注Column(autoIncrement=true)), fill值(FillOnInsert(populate=true))- Parameters:
entity- 实体类- Returns:
- 插入条数|执行结果
-
insertBatch
-
insertBatch
-
insertBatchWith
批量插入数据通过源对象(VO,Req,DTO等,通过field匹配,需确保类型兼容),不回填数据- Type Parameters:
S- 源对象类型- Parameters:
sources- 要插入的对象batchSize- 每次执行数量- Returns:
- 插入条数|执行结果
-
insertBatchWith
批量插入数据通过源对象(VO,Req,DTO等,通过field匹配,需确保类型兼容),不回填数据,batchSize由配置决定- Type Parameters:
S- 源对象类型- Parameters:
sources- 要插入的对象- Returns:
- 插入条数|执行结果
-
insertWith
插入数据通过源对象(VO,Req,DTO等,通过field匹配,需确保类型兼容),不回填数据- Parameters:
source- 源对象- Returns:
- 插入条数|执行结果
-
insertWith
-
insertWithMap
-