| 限定符和类型 | 方法和说明 |
|---|---|
static TableInfo |
Tables.get(Class entity)
获取表的信息
|
TableInfo |
ModelInfo.getTableInfo() |
TableInfo |
ResultTableFieldInfo.getTableInfo() |
| 构造器和说明 |
|---|
ResultTableFieldInfo(boolean resultMapping,
Class type,
int storey,
String tablePrefix,
TableInfo tableInfo,
TableFieldInfo tableFieldInfo,
Field field) |
ResultTableFieldInfo(Class type,
int storey,
String tablePrefix,
TableInfo tableInfo,
TableFieldInfo tableFieldInfo,
Field field) |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
LogicDeleteUtil.addLogicDeleteUpdateSets(BaseUpdate baseUpdate,
TableInfo tableInfo)
设置逻辑删除字段值 例如: set deleted=1 和 删除时间设置
|
static Object |
LogicDeleteUtil.getLogicDeleteTimeValue(TableInfo tableInfo)
获取逻辑删除时间
|
static boolean |
LogicDeleteUtil.isNeedLogicDelete(TableInfo tableInfo)
是否需要逻辑删除
|
static int |
LogicDeleteUtil.logicDelete(BasicMapper mapper,
TableInfo tableInfo,
Where where)
根据where 执行逻辑删除操作
实际为update操作
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected TableInfo |
BaseDaoImpl.getTableInfo() |
| 构造器和说明 |
|---|
MybatisMapperProxy(org.apache.ibatis.session.SqlSession sqlSession,
Class<T> mapperInterface,
Map methodCache,
Class<?> entityType,
TableInfo tableInfo) |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
TableIdGeneratorWrapper.addEntityKeyGenerator(org.apache.ibatis.mapping.MappedStatement ms,
String selectKeyId,
TableInfo tableInfo) |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> BaseInsert<?> |
EntityBatchInsertCreateUtil.create(BaseInsert<?> insert,
TableInfo tableInfo,
T[] insertData,
SaveBatchStrategy<T> saveBatchStrategy,
DbType dbType,
boolean useBatchExecutor) |
static <T> BaseInsert<?> |
EntityInsertCreateUtil.create(BaseInsert<?> insert,
TableInfo tableInfo,
T insertData,
SaveStrategy<T> saveStrategy,
DbType dbType) |
static Update |
EntityUpdateCmdCreateUtil.create(TableInfo tableInfo,
Object entity,
UpdateStrategy<?> updateStrategy) |
| 构造器和说明 |
|---|
EntityBatchInsertContext(BaseInsert<?> insert,
TableInfo tableInfo,
Collection<T> list,
SaveBatchStrategy<T> saveBatchStrategy) |
EntityInsertContext(BaseInsert<?> insert,
TableInfo tableInfo,
T entity,
SaveStrategy strategy) |
EntityUpdateContext(TableInfo tableInfo,
T t,
UpdateStrategy<T> updateStrategy) |
| 限定符和类型 | 方法和说明 |
|---|---|
TableInfo |
BaseMapper.getTableInfo()
获取当前实体类的TableInfo
|
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
CountMethodUtil.count(BasicMapper basicMapper,
TableInfo tableInfo,
Consumer<Where> consumer) |
static int |
CountMethodUtil.count(BasicMapper basicMapper,
TableInfo tableInfo,
Where where) |
static int |
CountMethodUtil.countAll(BasicMapper basicMapper,
TableInfo tableInfo) |
static <T> org.apache.ibatis.cursor.Cursor<T> |
CursorMethodUtil.cursor(BasicMapper basicMapper,
TableInfo tableInfo,
Consumer<Where> consumer) |
static <T> org.apache.ibatis.cursor.Cursor<T> |
CursorMethodUtil.cursor(BasicMapper basicMapper,
TableInfo tableInfo,
Consumer<Where> consumer,
Getter<T>[] selectFields) |
static <T> org.apache.ibatis.cursor.Cursor<T> |
CursorMethodUtil.cursor(BasicMapper basicMapper,
TableInfo tableInfo,
Where where,
Getter<T>[] selectFields) |
static <T> org.apache.ibatis.cursor.Cursor<T> |
CursorMethodUtil.cursorAll(BasicMapper basicMapper,
TableInfo tableInfo) |
static <T,ID extends Serializable> |
CursorMethodUtil.cursorByIds(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<ID> ids,
Getter<T>[] selectFields) |
static <T> org.apache.ibatis.cursor.Cursor<T> |
CursorMethodUtil.cursorByIds(BasicMapper basicMapper,
TableInfo tableInfo,
Serializable[] ids,
Getter<T>[] selectFields) |
static <E> int |
DeleteMethodUtil.delete(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<E> list) |
static int |
DeleteMethodUtil.delete(BasicMapper basicMapper,
TableInfo tableInfo,
Consumer<Where> consumer) |
static <E> int |
DeleteMethodUtil.delete(BasicMapper basicMapper,
TableInfo tableInfo,
E entity) |
static int |
DeleteMethodUtil.delete(BasicMapper basicMapper,
TableInfo tableInfo,
Where where) |
static int |
DeleteMethodUtil.deleteAll(BasicMapper basicMapper,
TableInfo tableInfo) |
static int |
DeleteMethodUtil.deleteById(BasicMapper basicMapper,
TableInfo tableInfo,
Serializable id) |
static <ID extends Serializable> |
DeleteMethodUtil.deleteByIds(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<ID> ids) |
static int |
DeleteMethodUtil.deleteByIds(BasicMapper basicMapper,
TableInfo tableInfo,
Serializable[] ids) |
static boolean |
ExistsMethodUtil.exists(BasicMapper basicMapper,
TableInfo tableInfo,
Consumer<Where> consumer) |
static boolean |
ExistsMethodUtil.exists(BasicMapper basicMapper,
TableInfo tableInfo,
Where where) |
static <T> T |
GetMethodUtil.get(BasicMapper basicMapper,
TableInfo tableInfo,
Consumer<Where> consumer) |
static <T> T |
GetMethodUtil.get(BasicMapper basicMapper,
TableInfo tableInfo,
Consumer<Where> consumer,
Getter<T>[] selectFields) |
static <T> T |
GetMethodUtil.get(BasicMapper basicMapper,
TableInfo tableInfo,
Where where,
Getter<T>[] selectFields) |
static <T> T |
GetMethodUtil.getById(BasicMapper basicMapper,
TableInfo tableInfo,
Serializable id,
Getter<T>[] selectFields) |
static <T> List<T> |
ListMethodUtil.list(BasicMapper basicMapper,
TableInfo tableInfo,
Integer limit,
Consumer<Where> consumer) |
static <T> List<T> |
ListMethodUtil.list(BasicMapper basicMapper,
TableInfo tableInfo,
Integer limit,
Consumer<Where> consumer,
Getter<T>[] selectFields) |
static <T> List<T> |
ListMethodUtil.list(BasicMapper basicMapper,
TableInfo tableInfo,
Integer limit,
Where where,
Getter<T>[] selectFields) |
static <T> List<T> |
ListMethodUtil.listAll(BasicMapper basicMapper,
TableInfo tableInfo) |
static <T,ID extends Serializable> |
ListMethodUtil.listByIds(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<ID> ids,
Getter<T>[] selectFields) |
static <T> List<T> |
ListMethodUtil.listByIds(BasicMapper basicMapper,
TableInfo tableInfo,
Serializable[] ids,
Getter<T>[] selectFields) |
static <ID extends Serializable,T> |
MapWithKeyMapperUtil.map(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<ID> ids) |
static <ID extends Serializable,T> |
MapWithKeyMapperUtil.map(BasicMapper basicMapper,
TableInfo tableInfo,
ID[] ids) |
static <T,K,ID extends Serializable> |
MapWithKeyMapperUtil.mapWithKey(BasicMapper basicMapper,
TableInfo tableInfo,
GetterFun<T,K> mapKey,
Collection<ID> ids) |
static <T,K> Map<K,T> |
MapWithKeyMapperUtil.mapWithKey(BasicMapper basicMapper,
TableInfo tableInfo,
GetterFun<T,K> mapKey,
Consumer<Where> consumer) |
static <T,K,ID extends Serializable> |
MapWithKeyMapperUtil.mapWithKey(BasicMapper basicMapper,
TableInfo tableInfo,
GetterFun<T,K> mapKey,
ID[] ids) |
static <T,K,ID extends Serializable> |
MapWithKeyMapperUtil.mapWithKey(BasicMapper basicMapper,
TableInfo tableInfo,
String mapKey,
Collection<ID> ids) |
static <T,K> Map<K,T> |
MapWithKeyMapperUtil.mapWithKey(BasicMapper basicMapper,
TableInfo tableInfo,
String mapKey,
Consumer<Where> consumer) |
static <T,K,ID extends Serializable> |
MapWithKeyMapperUtil.mapWithKey(BasicMapper basicMapper,
TableInfo tableInfo,
String mapKey,
ID[] ids) |
static <T,P extends IPager<T>> |
PagingMethodUtil.paging(BasicMapper basicMapper,
TableInfo tableInfo,
P pager,
Consumer<Where> consumer) |
static <T,P extends IPager<T>> |
PagingMethodUtil.paging(BasicMapper basicMapper,
TableInfo tableInfo,
P pager,
Consumer<Where> consumer,
Getter<T>[] selectFields) |
static <T,P extends IPager<T>> |
PagingMethodUtil.paging(BasicMapper basicMapper,
TableInfo tableInfo,
P pager,
Where where) |
static <T,P extends IPager<T>> |
PagingMethodUtil.paging(BasicMapper basicMapper,
TableInfo tableInfo,
P pager,
Where where,
Getter<T>[] selectFields) |
static <T> int |
SaveMethodUtil.save(BasicMapper basicMapper,
TableInfo tableInfo,
T entity) |
static <T> int |
SaveMethodUtil.save(BasicMapper basicMapper,
TableInfo tableInfo,
T entity,
SaveStrategy<T> strategy) |
static <E> int |
SaveMethodUtil.saveBatch(BasicMapper basicMapper,
BaseInsert<?> insert,
TableInfo tableInfo,
Collection<E> list,
SaveBatchStrategy<E> saveBatchStrategy) |
static <E> int |
SaveMethodUtil.saveBatch(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<E> list) |
static <T> int |
SaveMethodUtil.saveBatch(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<T> list,
SaveBatchStrategy<T> saveBatchStrategy) |
static <T> int |
SaveMethodUtil.saveList(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<T> list,
SaveStrategy strategy) |
static <T> int |
SaveOrUpdateMethodUtil.saveOrUpdate(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<T> list,
SaveOrUpdateStrategy saveOrUpdateStrategy) |
static <T> int |
SaveOrUpdateMethodUtil.saveOrUpdate(BasicMapper basicMapper,
TableInfo tableInfo,
T entity,
SaveOrUpdateStrategy saveOrUpdateStrategy) |
static int |
DeleteMethodUtil.truncate(BasicMapper basicMapper,
TableInfo tableInfo)
TRUNCATE TABLE
|
static <T> int |
UpdateMethodUtil.update(BasicMapper basicMapper,
TableInfo tableInfo,
T entity) |
static <T> int |
UpdateMethodUtil.update(BasicMapper basicMapper,
TableInfo tableInfo,
T entity,
Consumer<UpdateStrategy<T>> updateStrategy) |
static <T> int |
UpdateMethodUtil.update(BasicMapper basicMapper,
TableInfo tableInfo,
T entity,
UpdateStrategy<T> updateStrategy) |
static <T> int |
UpdateMethodUtil.updateList(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<T> list,
Consumer<UpdateStrategy<T>> updateStrategy) |
static <T> int |
UpdateMethodUtil.updateList(BasicMapper basicMapper,
TableInfo tableInfo,
Collection<T> list,
UpdateStrategy<T> updateStrategy) |
| 限定符和类型 | 字段和说明 |
|---|---|
protected Map<Class<?>,TableInfo> |
MybatisCmdFactory.tableInfoCache |
| 限定符和类型 | 方法和说明 |
|---|---|
TableInfo |
MybatisCmdFactory.getTableInfo(Class<?> entityClass) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
MybatisCmdFactory.cacheTableInfo(TableInfo tableInfo) |
| 限定符和类型 | 字段和说明 |
|---|---|
protected TableInfo |
MpTable.tableInfo |
| 限定符和类型 | 方法和说明 |
|---|---|
TableInfo |
MpTable.getTableInfo() |
| 构造器和说明 |
|---|
MpTable(TableInfo tableInfo) |
MpTable(TableInfo tableInfo,
String alias) |
| 限定符和类型 | 方法和说明 |
|---|---|
static <ID extends Serializable> |
WhereUtil.appendIdsWhere(Where where,
TableInfo tableInfo,
Collection<ID> ids)
使用 IN 拼接多个id条件
|
static void |
WhereUtil.appendIdsWhere(Where where,
TableInfo tableInfo,
Serializable[] ids)
使用 IN 拼接多个id条件
|
static void |
WhereUtil.appendIdWhere(Where where,
TableInfo tableInfo,
Serializable id)
拼接id条件
|
static void |
WhereUtil.appendIdWhereWithEntity(Where where,
TableInfo tableInfo,
Object entity)
拼接id条件
|
static <T> void |
WhereUtil.appendVersionWhere(Where where,
TableInfo tableInfo,
T entity)
添加version条件
|
static <ID extends Serializable,E> |
QueryUtil.buildIdQuery(TableInfo tableInfo,
ID id) |
static <ID extends Serializable,T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildIdQuery(TableInfo tableInfo,
ID id,
Consumer<Q> consumer) |
static <ID extends Serializable,E> |
QueryUtil.buildIdsQuery(TableInfo tableInfo,
Collection<ID> ids) |
static <ID extends Serializable,T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildIdsQuery(TableInfo tableInfo,
Collection<ID> ids,
Consumer<Q> consumer) |
static <ID extends Serializable,E> |
QueryUtil.buildIdsQuery(TableInfo tableInfo,
ID[] ids) |
static <ID extends Serializable,T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildIdsQuery(TableInfo tableInfo,
ID[] ids,
Consumer<Q> consumer) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildNoOptimizationQuery(TableInfo tableInfo) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildNoOptimizationQuery(TableInfo tableInfo,
Consumer<Q> consumer) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildNoOptimizationQuery(TableInfo tableInfo,
Where where) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildNoOptimizationQuery(TableInfo tableInfo,
Where where,
Consumer<Q> consumer) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildQuery(TableInfo tableInfo) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildQuery(TableInfo tableInfo,
Consumer<Q> consumer) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildQuery(TableInfo tableInfo,
Where where) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.buildQuery(TableInfo tableInfo,
Where where,
Consumer<Q> consumer) |
static Where |
WhereUtil.create(TableInfo tableInfo) |
static Where |
WhereUtil.create(TableInfo tableInfo,
Consumer<Where> consumer) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.fillQueryDefault(Q q,
TableInfo tableInfo) |
static <T,Q extends BaseQuery<Q,T>> |
QueryUtil.fillQueryDefault(Q q,
TableInfo tableInfo,
Getter<T>[] selectFields) |
| 限定符和类型 | 方法和说明 |
|---|---|
static Serializable |
TenantUtil.setTenantId(TableInfo tableInfo,
Object entity)
设置实体类的租户ID
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
TableInfoUtil.checkId(TableInfo tableInfo)
检查是否有ID
|
static Serializable |
TableInfoUtil.getEntityIdValue(TableInfo tableInfo,
Object entity)
从实体类中获取ID
|
static Serializable |
TableInfoUtil.getEntityIdValue(TableInfo tableInfo,
Object entity,
boolean check)
从实体类中获取ID
|
static Serializable |
ModelInfoUtil.getModelIdValue(ModelInfo modelInfo,
TableInfo tableInfo,
Model model,
boolean check)
从Model类中获取ID
|
Copyright © 2025. All rights reserved.