public class FlexConfiguration extends org.apache.ibatis.session.Configuration
| 限定符和类型 | 字段和说明 |
|---|---|
private static Map<String,org.apache.ibatis.mapping.MappedStatement> |
dynamicMappedStatementCache |
private org.apache.ibatis.binding.MapperRegistry |
mapperRegistry |
aggressiveLazyLoading, argNameBasedConstructorAutoMapping, autoMappingBehavior, autoMappingUnknownColumnBehavior, cacheEnabled, cacheRefMap, caches, callSettersOnNulls, configurationFactory, databaseId, defaultExecutorType, defaultFetchSize, defaultResultSetType, defaultSqlProviderType, defaultStatementTimeout, environment, incompleteCacheRefs, incompleteMethods, incompleteResultMaps, incompleteStatements, interceptorChain, jdbcTypeForNull, keyGenerators, languageRegistry, lazyLoadingEnabled, lazyLoadTriggerMethods, loadedResources, localCacheScope, logImpl, logPrefix, mappedStatements, mapUnderscoreToCamelCase, multipleResultSetsEnabled, nullableOnForEach, objectFactory, objectWrapperFactory, parameterMaps, proxyFactory, reflectorFactory, resultMaps, returnInstanceForEmptyRow, safeResultHandlerEnabled, safeRowBoundsEnabled, shrinkWhitespacesInSql, sqlFragments, typeAliasRegistry, typeHandlerRegistry, useActualParamName, useColumnLabel, useGeneratedKeys, variables, vfsImpl| 构造器和说明 |
|---|
FlexConfiguration() |
FlexConfiguration(org.apache.ibatis.mapping.Environment environment) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addMappedStatement(org.apache.ibatis.mapping.MappedStatement ms) |
<T> void |
addMapper(Class<T> type) |
void |
addMappers(String packageName) |
void |
addMappers(String packageName,
Class<?> superType) |
org.apache.ibatis.mapping.MappedStatement |
getMappedStatement(String id) |
<T> T |
getMapper(Class<T> type,
org.apache.ibatis.session.SqlSession sqlSession) |
org.apache.ibatis.binding.MapperRegistry |
getMapperRegistry() |
private TableInfo |
getTableInfo(org.apache.ibatis.mapping.MappedStatement ms) |
boolean |
hasMapper(Class<?> type) |
private boolean |
isDefaultResultMap(String statementId,
String resultMapId)
是否为默认的 resultMap,也就是未配置 resultMap
|
org.apache.ibatis.executor.Executor |
newExecutor(org.apache.ibatis.transaction.Transaction transaction,
org.apache.ibatis.session.ExecutorType executorType)
替换为 Flex 的 Executor,主要用于重建 CacheKey
默认情况下,Mybatis 的 CacheKey 构建是必须有 ParameterMapping,而 Flex 的 select 是不带有 ParameterMapping 的
|
org.apache.ibatis.executor.parameter.ParameterHandler |
newParameterHandler(org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameterObject,
org.apache.ibatis.mapping.BoundSql boundSql)
为原生 sql 设置参数
|
org.apache.ibatis.executor.resultset.ResultSetHandler |
newResultSetHandler(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
org.apache.ibatis.session.RowBounds rowBounds,
org.apache.ibatis.executor.parameter.ParameterHandler parameterHandler,
org.apache.ibatis.session.ResultHandler resultHandler,
org.apache.ibatis.mapping.BoundSql boundSql) |
org.apache.ibatis.executor.statement.StatementHandler |
newStatementHandler(org.apache.ibatis.executor.Executor executor,
org.apache.ibatis.mapping.MappedStatement mappedStatement,
Object parameterObject,
org.apache.ibatis.session.RowBounds rowBounds,
org.apache.ibatis.session.ResultHandler resultHandler,
org.apache.ibatis.mapping.BoundSql boundSql)
替换为 FlexStatementHandler,主要用来为实体类的多主键做支持、和数据审计
FlexStatementHandler 和 原生的 RoutingStatementHandler 对比,没有任何性能影响
|
private org.apache.ibatis.mapping.MappedStatement |
replaceEntityKeyGenerator(org.apache.ibatis.mapping.MappedStatement ms)
生成新的、已替换主键生成器的 MappedStatement
|
private org.apache.ibatis.mapping.MappedStatement |
replaceResultMap(org.apache.ibatis.mapping.MappedStatement ms,
TableInfo tableInfo)
替换 entity 查询的 ResultMap
|
private org.apache.ibatis.mapping.MappedStatement |
replaceRowKeyGenerator(org.apache.ibatis.mapping.MappedStatement ms)
生成新的、已替换主键生成器的 MappedStatement
|
addCache, addCacheRef, addIncompleteCacheRef, addIncompleteMethod, addIncompleteResultMap, addIncompleteStatement, addInterceptor, addKeyGenerator, addLoadedResource, addParameterMap, addResultMap, buildAllStatements, checkGloballyForDiscriminatedNestedResultMaps, checkLocallyForDiscriminatedNestedResultMaps, extractNamespace, getAutoMappingBehavior, getAutoMappingUnknownColumnBehavior, getCache, getCacheNames, getCaches, getConfigurationFactory, getDatabaseId, getDefaultExecutorType, getDefaultFetchSize, getDefaultResultSetType, getDefaultScriptingLanguageInstance, getDefaultScriptingLanuageInstance, getDefaultSqlProviderType, getDefaultStatementTimeout, getEnvironment, getIncompleteCacheRefs, getIncompleteMethods, getIncompleteResultMaps, getIncompleteStatements, getInterceptors, getJdbcTypeForNull, getKeyGenerator, getKeyGeneratorNames, getKeyGenerators, getLanguageDriver, getLanguageRegistry, getLazyLoadTriggerMethods, getLocalCacheScope, getLogImpl, getLogPrefix, getMappedStatement, getMappedStatementNames, getMappedStatements, getObjectFactory, getObjectWrapperFactory, getParameterMap, getParameterMapNames, getParameterMaps, getProxyFactory, getReflectorFactory, getResultMap, getResultMapNames, getResultMaps, getSqlFragments, getTypeAliasRegistry, getTypeHandlerRegistry, getVariables, getVfsImpl, hasCache, hasKeyGenerator, hasParameterMap, hasResultMap, hasStatement, hasStatement, isAggressiveLazyLoading, isArgNameBasedConstructorAutoMapping, isCacheEnabled, isCallSettersOnNulls, isLazyLoadingEnabled, isMapUnderscoreToCamelCase, isMultipleResultSetsEnabled, isNullableOnForEach, isResourceLoaded, isReturnInstanceForEmptyRow, isSafeResultHandlerEnabled, isSafeRowBoundsEnabled, isShrinkWhitespacesInSql, isUseActualParamName, isUseColumnLabel, isUseGeneratedKeys, newExecutor, newMetaObject, parsePendingCacheRefs, parsePendingMethods, parsePendingResultMaps, parsePendingStatements, setAggressiveLazyLoading, setArgNameBasedConstructorAutoMapping, setAutoMappingBehavior, setAutoMappingUnknownColumnBehavior, setCacheEnabled, setCallSettersOnNulls, setConfigurationFactory, setDatabaseId, setDefaultEnumTypeHandler, setDefaultExecutorType, setDefaultFetchSize, setDefaultResultSetType, setDefaultScriptingLanguage, setDefaultSqlProviderType, setDefaultStatementTimeout, setEnvironment, setJdbcTypeForNull, setLazyLoadingEnabled, setLazyLoadTriggerMethods, setLocalCacheScope, setLogImpl, setLogPrefix, setMapUnderscoreToCamelCase, setMultipleResultSetsEnabled, setNullableOnForEach, setObjectFactory, setObjectWrapperFactory, setProxyFactory, setReflectorFactory, setReturnInstanceForEmptyRow, setSafeResultHandlerEnabled, setSafeRowBoundsEnabled, setShrinkWhitespacesInSql, setUseActualParamName, setUseColumnLabel, setUseGeneratedKeys, setVariables, setVfsImplprivate static final Map<String,org.apache.ibatis.mapping.MappedStatement> dynamicMappedStatementCache
private final org.apache.ibatis.binding.MapperRegistry mapperRegistry
public FlexConfiguration()
public FlexConfiguration(org.apache.ibatis.mapping.Environment environment)
public org.apache.ibatis.executor.parameter.ParameterHandler newParameterHandler(org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameterObject, org.apache.ibatis.mapping.BoundSql boundSql)
newParameterHandler 在类中 org.apache.ibatis.session.Configurationpublic org.apache.ibatis.executor.resultset.ResultSetHandler newResultSetHandler(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement mappedStatement, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.executor.parameter.ParameterHandler parameterHandler, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql)
newResultSetHandler 在类中 org.apache.ibatis.session.Configurationpublic org.apache.ibatis.executor.statement.StatementHandler newStatementHandler(org.apache.ibatis.executor.Executor executor, org.apache.ibatis.mapping.MappedStatement mappedStatement, Object parameterObject, org.apache.ibatis.session.RowBounds rowBounds, org.apache.ibatis.session.ResultHandler resultHandler, org.apache.ibatis.mapping.BoundSql boundSql)
newStatementHandler 在类中 org.apache.ibatis.session.Configurationpublic org.apache.ibatis.executor.Executor newExecutor(org.apache.ibatis.transaction.Transaction transaction, org.apache.ibatis.session.ExecutorType executorType)
newExecutor 在类中 org.apache.ibatis.session.Configurationpublic org.apache.ibatis.mapping.MappedStatement getMappedStatement(String id)
getMappedStatement 在类中 org.apache.ibatis.session.Configurationpublic void addMappedStatement(org.apache.ibatis.mapping.MappedStatement ms)
addMappedStatement 在类中 org.apache.ibatis.session.Configurationprivate boolean isDefaultResultMap(String statementId, String resultMapId)
private org.apache.ibatis.mapping.MappedStatement replaceResultMap(org.apache.ibatis.mapping.MappedStatement ms, TableInfo tableInfo)
private org.apache.ibatis.mapping.MappedStatement replaceRowKeyGenerator(org.apache.ibatis.mapping.MappedStatement ms)
ms - MappedStatementprivate org.apache.ibatis.mapping.MappedStatement replaceEntityKeyGenerator(org.apache.ibatis.mapping.MappedStatement ms)
ms - MappedStatementprivate TableInfo getTableInfo(org.apache.ibatis.mapping.MappedStatement ms)
public <T> void addMapper(Class<T> type)
addMapper 在类中 org.apache.ibatis.session.Configurationpublic org.apache.ibatis.binding.MapperRegistry getMapperRegistry()
getMapperRegistry 在类中 org.apache.ibatis.session.Configurationpublic void addMappers(String packageName, Class<?> superType)
addMappers 在类中 org.apache.ibatis.session.Configurationpublic void addMappers(String packageName)
addMappers 在类中 org.apache.ibatis.session.Configurationpublic <T> T getMapper(Class<T> type, org.apache.ibatis.session.SqlSession sqlSession)
getMapper 在类中 org.apache.ibatis.session.ConfigurationCopyright © 2024. All rights reserved.