public class BaseMapperWrap<T> extends Object implements BaseMapper<T>
| Constructor and Description |
|---|
BaseMapperWrap(DbContext db,
BaseMapper<T> baseMapper) |
BaseMapperWrap(DbContext db,
Class<?> entityType,
String tableName) |
public BaseMapperWrap(DbContext db, BaseMapper<T> baseMapper)
protected Class<?> entityType()
public DbContext db()
db in interface BaseMapper<T>public String tableName()
tableName in interface BaseMapper<T>public String tablePk()
tablePk in interface BaseMapper<T>public Class<?> entityClz()
entityClz in interface BaseMapper<T>public Long insert(T entity, boolean excludeNull)
insert in interface BaseMapper<T>public Long insert(T entity, Act2<T,DataItem> dataBuilder)
insert in interface BaseMapper<T>entity - 写入的实体dataBuilder - 数据组装器public void insertList(List<T> list)
insertList in interface BaseMapper<T>public void insertList(List<T> list, Act2<T,DataItem> dataBuilder)
insertList in interface BaseMapper<T>list - 待插入的数据dataBuilder - 数据组装器public Integer deleteById(Object id)
deleteById in interface BaseMapper<T>public Integer deleteByIds(Iterable idList)
deleteByIds in interface BaseMapper<T>public Integer deleteByMap(Map<String,Object> columnMap)
deleteByMap in interface BaseMapper<T>public Integer delete(Act1<MapperWhereQ> c)
delete in interface BaseMapper<T>public Integer updateById(T entity, boolean excludeNull)
updateById in interface BaseMapper<T>public Integer updateById(T entity, Act2<T,DataItem> dataBuilder)
updateById in interface BaseMapper<T>entity - 待更新的实体dataBuilder - 组装data的方式,方便支持部分属性允许设置为null,部分不允许public Integer update(T entity, boolean excludeNull, Act1<MapperWhereQ> c)
update in interface BaseMapper<T>public Integer update(T entity, Act2<T,DataItem> dataBuilder, Act1<MapperWhereQ> c)
update in interface BaseMapper<T>entity - 待更新的实体dataBuilder - 组装data的方式,方便支持部分属性允许设置为null,部分不允许c - 更新数据的条件public int[] updateList(List<T> list, Act2<T,DataItem> dataBuilder, Property<T,?>... conditionFields)
updateList in interface BaseMapper<T>public Long upsert(T entity, boolean excludeNull)
upsert in interface BaseMapper<T>public Long upsert(T entity, Act2<T,DataItem> dataBuilder)
upsert in interface BaseMapper<T>entity - 要处理的实体dataBuilder - 数据组装器public Long upsertBy(T entity, boolean excludeNull, String conditionFields)
upsertBy in interface BaseMapper<T>public Long upsertBy(T entity, Act2<T,DataItem> dataBuilder, String conditionFields)
upsertBy in interface BaseMapper<T>entity - 要处理的实体dataBuilder - 数据组装器conditionFields - 更新的条件public boolean existsById(Object id)
existsById in interface BaseMapper<T>public boolean exists(Act1<MapperWhereQ> c)
exists in interface BaseMapper<T>public T selectById(Object id)
selectById in interface BaseMapper<T>public List<T> selectByIds(Iterable idList)
selectByIds in interface BaseMapper<T>public List<T> selectByMap(Map<String,Object> columnMap)
selectByMap in interface BaseMapper<T>public T selectItem(T entity)
selectItem in interface BaseMapper<T>public T selectItem(Act1<MapperWhereQ> c)
selectItem in interface BaseMapper<T>public Object selectValue(String column, Act1<MapperWhereQ> c)
selectValue in interface BaseMapper<T>public Map<String,Object> selectMap(Act1<MapperWhereQ> c)
selectMap in interface BaseMapper<T>public Long selectCount(Act1<MapperWhereQ> c)
selectCount in interface BaseMapper<T>public List<T> selectList(Act1<MapperWhereQ> c)
selectList in interface BaseMapper<T>public List<Map<String,Object>> selectMapList(Act1<MapperWhereQ> c)
selectMapList in interface BaseMapper<T>public List<Object> selectArray(String column, Act1<MapperWhereQ> c)
selectArray in interface BaseMapper<T>public List<T> selectList(int start, int size, Act1<MapperWhereQ> c)
selectList in interface BaseMapper<T>public List<Map<String,Object>> selectMapList(int start, int size, Act1<MapperWhereQ> c)
selectMapList in interface BaseMapper<T>public List<Object> selectArray(String column, int start, int size, Act1<MapperWhereQ> c)
selectArray in interface BaseMapper<T>public IDataReader<T> selectReader(Act1<MapperWhereQ> c)
selectReader in interface BaseMapper<T>public IDataReader<T> selectReader(int fetchSize, Act1<MapperWhereQ> c)
selectReader in interface BaseMapper<T>public IPage<T> selectPage(int start, int size, Act1<MapperWhereQ> c)
selectPage in interface BaseMapper<T>public IPage<Map<String,Object>> selectMapPage(int start, int size, Act1<MapperWhereQ> c)
selectMapPage in interface BaseMapper<T>public List<T> selectTop(int size, Act1<MapperWhereQ> c)
selectTop in interface BaseMapper<T>public List<Map<String,Object>> selectMapTop(int size, Act1<MapperWhereQ> c)
selectMapTop in interface BaseMapper<T>protected DbTableQuery getQr()
protected DbTableQuery getQr(Act1<MapperWhereQ> c)
Copyright © 2025. All rights reserved.