| Constructor and Description |
|---|
SequenceKeyGenerator(TableInfo tableInfo,
String sqlId,
boolean executeBefore)
初始化序列生成器
|
| Modifier and Type | Method and Description |
|---|---|
void |
MapperInterfaceRegister.processRegisterMapper(TableInfo tableInfo,
Class<?> mapperInterfaceClass,
Class<?> sqlMapperClass)
注册通用Mapper接口
|
| Modifier and Type | Method and Description |
|---|---|
String |
DeleteMapperTemplate.deleteByCondition(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
删除记录,生成 delete 语句。
|
String |
DeleteMapperTemplate.deleteByConditionAndUpdate(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
删除记录,生成 delete 语句。
|
String |
DeleteMapperTemplate.deleteByPrimaryKey(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
删除记录,生成 delete 语句。
|
String |
DeleteMapperTemplate.deleteWithPrimaryKey(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
删除记录,生成 delete 语句;如果数据库表支持"逻辑删除",则会生成 update 语句。
|
| Modifier and Type | Method and Description |
|---|---|
String |
InsertMapperTemplate.insert(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
创建新的记录,生成 insert 语句。
|
String |
InsertMapperTemplate.insertAllColumn(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
创建新的记录,生成 insert 语句。
|
String |
InsertMapperTemplate.insertBatch(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
批量创建新的记录,生成 insert 语句。
|
| Modifier and Type | Method and Description |
|---|---|
String |
SelectMapperTemplate.selectByPrimaryKey(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectByPrimaryKeyIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectMapperTemplate.selectCount(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectMapperTemplate.selectCount2(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectCountIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectIncludeLogicDeleteMapperTemplate.selectCountIncludeLogicDelete2(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectMapperTemplate.selectList(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectMapperTemplate.selectListByPrimaryKey(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectListByPrimaryKeyIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectListIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectMapperTemplate.selectListWithPrimaryKey(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectListWithPrimaryKeyIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectSortMapperTemplate.selectListWithSort(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectSortMapperTemplate.selectListWithSort2(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectSortIncludeLogicDeleteMapperTemplate.selectListWithSortIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectSortIncludeLogicDeleteMapperTemplate.selectListWithSortIncludeLogicDelete2(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectMapperTemplate.selectOne(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectOneIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectMapperTemplate.selectPage(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectMapperTemplate.selectPage2(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectPageIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectIncludeLogicDeleteMapperTemplate.selectPageIncludeLogicDelete2(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
String |
SelectMapperTemplate.selectWithPrimaryKey(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,生成 select 语句。
|
String |
SelectIncludeLogicDeleteMapperTemplate.selectWithPrimaryKeyIncludeLogicDelete(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
查询记录,不会过滤掉已经被标记为逻辑删除(
Column.logicDelete())的数据,生成 select 语句。 |
| Modifier and Type | Method and Description |
|---|---|
String |
UpdateMapperTemplate.updateByCondition(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
更新记录,生成 update 语句。
|
String |
UpdateMapperTemplate.updateByPrimaryKey(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
更新记录,生成 update 语句。
|
String |
UpdateMapperTemplate.updateByPrimaryKeyAllColumn(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
更新记录,生成 update 语句。
|
String |
UpdateMapperTemplate.updateUseMapByCondition(TableInfo tableInfo,
org.apache.ibatis.mapping.MappedStatement ms)
更新记录,生成 update 语句。
|
| Modifier and Type | Field and Description |
|---|---|
protected TableInfo |
BaseCrudServiceImpl.tableInfo |
| Modifier and Type | Method and Description |
|---|---|
TableInfo |
TableInfo.addMapperInterfaceClass(Class<?> mapperInterface)
设置关联的 mapper interface class
|
default TableInfo |
Sequence.getTableInfo()
获取数据库表结构信息
|
static TableInfo |
TableMetaObject.getTableInfo(Class<?> entityClass)
获取缓存中的"数据库表结构信息"
|
static TableInfo |
TableMetaObject.getTableInfo(Class<?> entityClass,
TableConfig config,
org.apache.ibatis.session.Configuration configuration)
获取缓存中的"数据库表结构信息",或者获取初始化"数据库表结构信息"
|
static TableInfo |
TableMetaObject.getTableInfoByMapperInterface(Class<?> mapperInterface,
TableConfig config,
org.apache.ibatis.session.Configuration configuration)
获取缓存中的"数据库表结构信息",或者获取初始化"数据库表结构信息"
|
| Modifier and Type | Method and Description |
|---|---|
static Map<Class<?>,TableInfo> |
TableMetaObject.getTableInfoMap()
获取缓存中的全部"数据库表结构信息"
|
| Modifier and Type | Method and Description |
|---|---|
static org.apache.ibatis.mapping.ResultMap |
TableMetaObject.builderBaseResultMap(TableInfo tableInfo,
org.apache.ibatis.session.Configuration configuration)
生成实体的 BaseResultMap 对象,表映射结果集。类似 Mapper XML 中效果:
|
static String |
TableMetaObject.builderSelectAllColumns(TableInfo tableInfo)
生成 select 查询所有列sql语句,示例如下:
|
static StringBuilder |
TableMetaObject.builderWhereByListPrimaryKeySql(TableInfo tableInfo,
boolean includeLogicDelete)
生成 where 主键条件sql语句(
includeLogicDelete = false
,如果表是逻辑删除,会添加逻辑删除的字段),示例如下: |
static StringBuilder |
TableMetaObject.builderWhereConditionSql(TableInfo tableInfo,
boolean includeLogicDelete)
生成 where 所有条件sql语句(
includeLogicDelete = false
,如果表是逻辑删除,会添加逻辑删除的字段),示例如下: |
static StringBuilder |
TableMetaObject.builderWhereConditionWithParameterSql(TableInfo tableInfo,
boolean includeLogicDelete,
String conditionPrefix)
生成 where 所有条件sql语句(
includeLogicDelete = false
,如果表是逻辑删除,会添加逻辑删除的字段),带有参数前缀,示例如下: |
static StringBuilder |
TableMetaObject.builderWherePrimaryKeySql(TableInfo tableInfo,
boolean includeLogicDelete)
生成 where 主键条件sql语句(
includeLogicDelete = false
,如果表是逻辑删除,会添加逻辑删除的字段),示例如下: |
static StringBuilder |
TableMetaObject.builderWhereWithListPrimaryKeySql(TableInfo tableInfo,
boolean includeLogicDelete)
生成 where 主键条件sql语句(
includeLogicDelete = false
,如果表是逻辑删除,会添加逻辑删除的字段),示例如下: |
static String |
TableMetaObject.getTableName(TableInfo tableInfo)
获取数据库完整的表名
|
default void |
Sequence.setTableInfo(TableInfo tableInfo)
设置数据库表结构信息,会在生成
SequenceKeyGenerator 初始化的时候调用 |
Copyright © 2018–2019. All rights reserved.