Class R2dbcMybatisConfiguration


  • public class R2dbcMybatisConfiguration
    extends org.apache.ibatis.session.Configuration
    The type R2dbc mybatis configuration.
    Version:
    1.0.0
    Author:
    Gang Cheng
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.ibatis.session.Configuration

        org.apache.ibatis.session.Configuration.StrictMap<V extends Object>
    • Field Summary

      • Fields inherited from class org.apache.ibatis.session.Configuration

        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, mapperRegistry, mapUnderscoreToCamelCase, multipleResultSetsEnabled, nullableOnForEach, objectFactory, objectWrapperFactory, parameterMaps, proxyFactory, reflectorFactory, resultMaps, returnInstanceForEmptyRow, safeResultHandlerEnabled, safeRowBoundsEnabled, shrinkWhitespacesInSql, sqlFragments, typeAliasRegistry, typeHandlerRegistry, useActualParamName, useColumnLabel, useGeneratedKeys, variables, vfsImpl
    • Constructor Summary

      Constructors 
      Constructor Description
      R2dbcMybatisConfiguration()
      Instantiates a new R2dbc mybatis configuration.
      R2dbcMybatisConfiguration​(org.apache.ibatis.mapping.Environment environment)
      Instantiates a new R2dbc mybatis configuration.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMappedStatement​(org.apache.ibatis.mapping.MappedStatement ms)  
      <T> void addMapper​(Class<T> type)  
      void addMappers​(String packageName)  
      void addMappers​(String packageName, Class<?> superType)  
      void addPlaceholderDialect​(PlaceholderDialect placeholderDialect)
      Add placeholder dialect.
      void addR2dbcTypeHandlerAdapter​(String packageName)
      Add R2dbc type handler adapter.
      void addR2dbcTypeHandlerAdapter​(R2dbcTypeHandlerAdapter<?> r2dbcTypeHandlerAdapter)
      Add R2dbc type handler adapter.
      io.r2dbc.spi.ConnectionFactory getConnectionFactory()
      Gets connection factory.
      Duration getFormattedDialectSqlCacheExpireDuration()
      get formatted dialect sql timeout duration
      Integer getFormattedDialectSqlCacheMaxSize()
      get formatted dialect sql cache max size
      <T> T getMapper​(Class<T> type, ReactiveSqlSession reactiveSqlSession)
      Gets mapper.
      Set<Class<?>> getNotSupportedDataTypes()
      Gets not supported data types.
      PlaceholderDialectRegistry getPlaceholderDialectRegistry()
      Get placeholder dialect registry
      R2dbcStatementLog getR2dbcStatementLog​(org.apache.ibatis.mapping.MappedStatement mappedStatement)
      get r2dbc statement log
      R2dbcStatementLogFactory getR2dbcStatementLogFactory()
      get r2dbc statement log factory
      R2dbcTypeHandlerAdapterRegistry getR2dbcTypeHandlerAdapterRegistry()
      Gets R2dbc type handler adapter registry.
      boolean hasMapper​(Class<?> type)  
      void setConnectionFactory​(io.r2dbc.spi.ConnectionFactory connectionFactory)
      Sets connection factory.
      void setFormattedDialectSqlCacheExpireDuration​(Duration formattedDialectSqlCacheExpireDuration)
      Sets formatted dialect sql cache expire duration.
      void setFormattedDialectSqlCacheMaxSize​(Integer formattedDialectSqlCacheMaxSize)
      Sets formatted dialect sql cache max size.
      void setNotSupportedJdbcType​(Class<?> clazz)
      Sets not supported jdbc type.
      • Methods inherited from class org.apache.ibatis.session.Configuration

        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, getMappedStatement, getMappedStatementNames, getMappedStatements, getMapper, getMapperRegistry, 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, newExecutor, newMetaObject, newParameterHandler, newResultSetHandler, newStatementHandler, 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, setVfsImpl
    • Constructor Detail

      • R2dbcMybatisConfiguration

        public R2dbcMybatisConfiguration()
        Instantiates a new R2dbc mybatis configuration.
      • R2dbcMybatisConfiguration

        public R2dbcMybatisConfiguration​(org.apache.ibatis.mapping.Environment environment)
        Instantiates a new R2dbc mybatis configuration.
        Parameters:
        environment - the environment
    • Method Detail

      • getMapper

        public <T> T getMapper​(Class<T> type,
                               ReactiveSqlSession reactiveSqlSession)
        Gets mapper.
        Type Parameters:
        T - the type parameter
        Parameters:
        type - the type
        reactiveSqlSession - the reactive sql session
        Returns:
        the mapper
      • getConnectionFactory

        public io.r2dbc.spi.ConnectionFactory getConnectionFactory()
        Gets connection factory.
        Returns:
        the connection factory
      • setConnectionFactory

        public void setConnectionFactory​(io.r2dbc.spi.ConnectionFactory connectionFactory)
        Sets connection factory.
        Parameters:
        connectionFactory - the connection factory
      • addMapper

        public <T> void addMapper​(Class<T> type)
        Overrides:
        addMapper in class org.apache.ibatis.session.Configuration
      • addMappers

        public void addMappers​(String packageName,
                               Class<?> superType)
        Overrides:
        addMappers in class org.apache.ibatis.session.Configuration
      • addMappers

        public void addMappers​(String packageName)
        Overrides:
        addMappers in class org.apache.ibatis.session.Configuration
      • hasMapper

        public boolean hasMapper​(Class<?> type)
        Overrides:
        hasMapper in class org.apache.ibatis.session.Configuration
      • addMappedStatement

        public void addMappedStatement​(org.apache.ibatis.mapping.MappedStatement ms)
        Overrides:
        addMappedStatement in class org.apache.ibatis.session.Configuration
      • addR2dbcTypeHandlerAdapter

        public void addR2dbcTypeHandlerAdapter​(R2dbcTypeHandlerAdapter<?> r2dbcTypeHandlerAdapter)
        Add R2dbc type handler adapter.
        Parameters:
        r2dbcTypeHandlerAdapter - the R2dbc type handler adapter
      • addR2dbcTypeHandlerAdapter

        public void addR2dbcTypeHandlerAdapter​(String packageName)
        Add R2dbc type handler adapter.
        Parameters:
        packageName - the package name
      • getR2dbcTypeHandlerAdapterRegistry

        public R2dbcTypeHandlerAdapterRegistry getR2dbcTypeHandlerAdapterRegistry()
        Gets R2dbc type handler adapter registry.
        Returns:
        the R2dbc type handler adapter registry
      • setNotSupportedJdbcType

        public void setNotSupportedJdbcType​(Class<?> clazz)
        Sets not supported jdbc type.
        Parameters:
        clazz - the clazz
      • getNotSupportedDataTypes

        public Set<Class<?>> getNotSupportedDataTypes()
        Gets not supported data types.
        Returns:
        the not supported data types
      • getR2dbcStatementLog

        public R2dbcStatementLog getR2dbcStatementLog​(org.apache.ibatis.mapping.MappedStatement mappedStatement)
        get r2dbc statement log
        Parameters:
        mappedStatement - target MappedStatement
        Returns:
        the R2dbcStatementLog
      • getR2dbcStatementLogFactory

        public R2dbcStatementLogFactory getR2dbcStatementLogFactory()
        get r2dbc statement log factory
        Returns:
        the R2dbcStatementLogFactory
      • addPlaceholderDialect

        public void addPlaceholderDialect​(PlaceholderDialect placeholderDialect)
        Add placeholder dialect.
        Parameters:
        placeholderDialect - the placeholder dialect
      • getPlaceholderDialectRegistry

        public PlaceholderDialectRegistry getPlaceholderDialectRegistry()
        Get placeholder dialect registry
        Returns:
        the placeholder dialect registry
      • getFormattedDialectSqlCacheMaxSize

        public Integer getFormattedDialectSqlCacheMaxSize()
        get formatted dialect sql cache max size
        Returns:
        cache max size
      • setFormattedDialectSqlCacheMaxSize

        public void setFormattedDialectSqlCacheMaxSize​(Integer formattedDialectSqlCacheMaxSize)
        Sets formatted dialect sql cache max size.
        Parameters:
        formattedDialectSqlCacheMaxSize - the formatted dialect sql cache max size
      • getFormattedDialectSqlCacheExpireDuration

        public Duration getFormattedDialectSqlCacheExpireDuration()
        get formatted dialect sql timeout duration
        Returns:
        cache expire duration
      • setFormattedDialectSqlCacheExpireDuration

        public void setFormattedDialectSqlCacheExpireDuration​(Duration formattedDialectSqlCacheExpireDuration)
        Sets formatted dialect sql cache expire duration.
        Parameters:
        formattedDialectSqlCacheExpireDuration - the formatted dialect sql expire duration