public class

Configuration

extends Object
java.lang.Object
   ↳ org.apache.ibatis.session.Configuration

Summary

Nested Classes
class Configuration.StrictMap<V>  
Fields
protected boolean aggressiveLazyLoading
protected AutoMappingBehavior autoMappingBehavior
protected AutoMappingUnknownColumnBehavior autoMappingUnknownColumnBehavior
protected boolean cacheEnabled
protected final Map<String, String> cacheRefMap
protected final Map<String, Cache> caches
protected boolean callSettersOnNulls
protected Class<?> configurationFactory Configuration factory class.
protected String databaseId
protected ExecutorType defaultExecutorType
protected Integer defaultFetchSize
protected Integer defaultStatementTimeout
protected Environment environment
protected final Collection<CacheRefResolver> incompleteCacheRefs
protected final Collection<MethodResolver> incompleteMethods
protected final Collection<ResultMapResolver> incompleteResultMaps
protected final Collection<XMLStatementBuilder> incompleteStatements
protected final InterceptorChain interceptorChain
protected JdbcType jdbcTypeForNull
protected final Map<String, KeyGenerator> keyGenerators
protected final LanguageDriverRegistry languageRegistry
protected Set<String> lazyLoadTriggerMethods
protected boolean lazyLoadingEnabled
protected final Set<String> loadedResources
protected LocalCacheScope localCacheScope
protected Class<? extends Log> logImpl
protected String logPrefix
protected boolean mapUnderscoreToCamelCase
protected final Map<String, MappedStatement> mappedStatements
protected MapperRegistry mapperRegistry
protected boolean multipleResultSetsEnabled
protected ObjectFactory objectFactory
protected ObjectWrapperFactory objectWrapperFactory
protected final Map<String, ParameterMap> parameterMaps
protected ProxyFactory proxyFactory
protected ReflectorFactory reflectorFactory
protected final Map<String, ResultMap> resultMaps
protected boolean safeResultHandlerEnabled
protected boolean safeRowBoundsEnabled
protected final Map<String, XNode> sqlFragments
protected final TypeAliasRegistry typeAliasRegistry
protected final TypeHandlerRegistry typeHandlerRegistry
protected boolean useColumnLabel
protected boolean useGeneratedKeys
protected Properties variables
protected Class<? extends VFS> vfsImpl
Public Constructors
Configuration(Environment environment)
Configuration()
Public Methods
void addCache(Cache cache)
void addCacheRef(String namespace, String referencedNamespace)
void addIncompleteCacheRef(CacheRefResolver incompleteCacheRef)
void addIncompleteMethod(MethodResolver builder)
void addIncompleteResultMap(ResultMapResolver resultMapResolver)
void addIncompleteStatement(XMLStatementBuilder incompleteStatement)
void addInterceptor(Interceptor interceptor)
void addKeyGenerator(String id, KeyGenerator keyGenerator)
void addLoadedResource(String resource)
void addMappedStatement(MappedStatement ms)
<T> void addMapper(Class<T> type)
void addMappers(String packageName, Class<?> superType)
void addMappers(String packageName)
void addParameterMap(ParameterMap pm)
void addResultMap(ResultMap rm)
AutoMappingBehavior getAutoMappingBehavior()
AutoMappingUnknownColumnBehavior getAutoMappingUnknownColumnBehavior()
Cache getCache(String id)
Collection<String> getCacheNames()
Collection<Cache> getCaches()
Class<?> getConfigurationFactory()
String getDatabaseId()
ExecutorType getDefaultExecutorType()
Integer getDefaultFetchSize()
LanguageDriver getDefaultScriptingLanuageInstance()
Integer getDefaultStatementTimeout()
Environment getEnvironment()
Collection<CacheRefResolver> getIncompleteCacheRefs()
Collection<MethodResolver> getIncompleteMethods()
Collection<ResultMapResolver> getIncompleteResultMaps()
Collection<XMLStatementBuilder> getIncompleteStatements()
List<Interceptor> getInterceptors()
JdbcType getJdbcTypeForNull()
KeyGenerator getKeyGenerator(String id)
Collection<String> getKeyGeneratorNames()
Collection<KeyGenerator> getKeyGenerators()
LanguageDriverRegistry getLanguageRegistry()
Set<String> getLazyLoadTriggerMethods()
LocalCacheScope getLocalCacheScope()
Class<? extends Log> getLogImpl()
String getLogPrefix()
MappedStatement getMappedStatement(String id)
MappedStatement getMappedStatement(String id, boolean validateIncompleteStatements)
Collection<String> getMappedStatementNames()
Collection<MappedStatement> getMappedStatements()
<T> T getMapper(Class<T> type, SqlSession sqlSession)
MapperRegistry getMapperRegistry()
ObjectFactory getObjectFactory()
ObjectWrapperFactory getObjectWrapperFactory()
ParameterMap getParameterMap(String id)
Collection<String> getParameterMapNames()
Collection<ParameterMap> getParameterMaps()
ProxyFactory getProxyFactory()
ReflectorFactory getReflectorFactory()
ResultMap getResultMap(String id)
Collection<String> getResultMapNames()
Collection<ResultMap> getResultMaps()
Map<String, XNode> getSqlFragments()
TypeAliasRegistry getTypeAliasRegistry()
TypeHandlerRegistry getTypeHandlerRegistry()
Properties getVariables()
Class<? extends VFS> getVfsImpl()
boolean hasCache(String id)
boolean hasKeyGenerator(String id)
boolean hasMapper(Class<?> type)
boolean hasParameterMap(String id)
boolean hasResultMap(String id)
boolean hasStatement(String statementName, boolean validateIncompleteStatements)
boolean hasStatement(String statementName)
boolean isAggressiveLazyLoading()
boolean isCacheEnabled()
boolean isCallSettersOnNulls()
boolean isLazyLoadingEnabled()
boolean isMapUnderscoreToCamelCase()
boolean isMultipleResultSetsEnabled()
boolean isResourceLoaded(String resource)
boolean isSafeResultHandlerEnabled()
boolean isSafeRowBoundsEnabled()
boolean isUseColumnLabel()
boolean isUseGeneratedKeys()
Executor newExecutor(Transaction transaction, ExecutorType executorType)
Executor newExecutor(Transaction transaction)
MetaObject newMetaObject(Object object)
ParameterHandler newParameterHandler(MappedStatement mappedStatement, Object parameterObject, BoundSql boundSql)
ResultSetHandler newResultSetHandler(Executor executor, MappedStatement mappedStatement, RowBounds rowBounds, ParameterHandler parameterHandler, ResultHandler resultHandler, BoundSql boundSql)
StatementHandler newStatementHandler(Executor executor, MappedStatement mappedStatement, Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql)
void setAggressiveLazyLoading(boolean aggressiveLazyLoading)
void setAutoMappingBehavior(AutoMappingBehavior autoMappingBehavior)
void setAutoMappingUnknownColumnBehavior(AutoMappingUnknownColumnBehavior autoMappingUnknownColumnBehavior)
void setCacheEnabled(boolean cacheEnabled)
void setCallSettersOnNulls(boolean callSettersOnNulls)
void setConfigurationFactory(Class<?> configurationFactory)
void setDatabaseId(String databaseId)
void setDefaultExecutorType(ExecutorType defaultExecutorType)
void setDefaultFetchSize(Integer defaultFetchSize)
void setDefaultScriptingLanguage(Class<?> driver)
void setDefaultStatementTimeout(Integer defaultStatementTimeout)
void setEnvironment(Environment environment)
void setJdbcTypeForNull(JdbcType jdbcTypeForNull)
void setLazyLoadTriggerMethods(Set<String> lazyLoadTriggerMethods)
void setLazyLoadingEnabled(boolean lazyLoadingEnabled)
void setLocalCacheScope(LocalCacheScope localCacheScope)
void setLogImpl(Class<?> logImpl)
void setLogPrefix(String logPrefix)
void setMapUnderscoreToCamelCase(boolean mapUnderscoreToCamelCase)
void setMultipleResultSetsEnabled(boolean multipleResultSetsEnabled)
void setObjectFactory(ObjectFactory objectFactory)
void setObjectWrapperFactory(ObjectWrapperFactory objectWrapperFactory)
void setProxyFactory(ProxyFactory proxyFactory)
void setReflectorFactory(ReflectorFactory reflectorFactory)
void setSafeResultHandlerEnabled(boolean safeResultHandlerEnabled)
void setSafeRowBoundsEnabled(boolean safeRowBoundsEnabled)
void setUseColumnLabel(boolean useColumnLabel)
void setUseGeneratedKeys(boolean useGeneratedKeys)
void setVariables(Properties variables)
void setVfsImpl(Class<?> vfsImpl)
Protected Methods
void buildAllStatements()
void checkGloballyForDiscriminatedNestedResultMaps(ResultMap rm)
void checkLocallyForDiscriminatedNestedResultMaps(ResultMap rm)
String extractNamespace(String statementId)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected boolean aggressiveLazyLoading

protected AutoMappingBehavior autoMappingBehavior

protected AutoMappingUnknownColumnBehavior autoMappingUnknownColumnBehavior

protected boolean cacheEnabled

protected final Map<String, String> cacheRefMap

protected final Map<String, Cache> caches

protected boolean callSettersOnNulls

protected Class<?> configurationFactory

Configuration factory class. Used to create Configuration for loading deserialized unread properties.

See Also

protected String databaseId

protected ExecutorType defaultExecutorType

protected Integer defaultFetchSize

protected Integer defaultStatementTimeout

protected Environment environment

protected final Collection<CacheRefResolver> incompleteCacheRefs

protected final Collection<MethodResolver> incompleteMethods

protected final Collection<ResultMapResolver> incompleteResultMaps

protected final Collection<XMLStatementBuilder> incompleteStatements

protected final InterceptorChain interceptorChain

protected JdbcType jdbcTypeForNull

protected final Map<String, KeyGenerator> keyGenerators

protected final LanguageDriverRegistry languageRegistry

protected Set<String> lazyLoadTriggerMethods

protected boolean lazyLoadingEnabled

protected final Set<String> loadedResources

protected LocalCacheScope localCacheScope

protected Class<? extends Log> logImpl

protected String logPrefix

protected boolean mapUnderscoreToCamelCase

protected final Map<String, MappedStatement> mappedStatements

protected MapperRegistry mapperRegistry

protected boolean multipleResultSetsEnabled

protected ObjectFactory objectFactory

protected ObjectWrapperFactory objectWrapperFactory

protected final Map<String, ParameterMap> parameterMaps

protected ProxyFactory proxyFactory

protected ReflectorFactory reflectorFactory

protected final Map<String, ResultMap> resultMaps

protected boolean safeResultHandlerEnabled

protected boolean safeRowBoundsEnabled

protected final Map<String, XNode> sqlFragments

protected final TypeAliasRegistry typeAliasRegistry

protected final TypeHandlerRegistry typeHandlerRegistry

protected boolean useColumnLabel

protected boolean useGeneratedKeys

protected Properties variables

protected Class<? extends VFS> vfsImpl

Public Constructors

public Configuration (Environment environment)

public Configuration ()

Public Methods

public void addCache (Cache cache)

public void addCacheRef (String namespace, String referencedNamespace)

public void addIncompleteCacheRef (CacheRefResolver incompleteCacheRef)

public void addIncompleteMethod (MethodResolver builder)

public void addIncompleteResultMap (ResultMapResolver resultMapResolver)

public void addIncompleteStatement (XMLStatementBuilder incompleteStatement)

public void addInterceptor (Interceptor interceptor)

public void addKeyGenerator (String id, KeyGenerator keyGenerator)

public void addLoadedResource (String resource)

public void addMappedStatement (MappedStatement ms)

public void addMapper (Class<T> type)

public void addMappers (String packageName, Class<?> superType)

public void addMappers (String packageName)

public void addParameterMap (ParameterMap pm)

public void addResultMap (ResultMap rm)

public AutoMappingBehavior getAutoMappingBehavior ()

public AutoMappingUnknownColumnBehavior getAutoMappingUnknownColumnBehavior ()

public Cache getCache (String id)

public Collection<String> getCacheNames ()

public Collection<Cache> getCaches ()

public Class<?> getConfigurationFactory ()

public String getDatabaseId ()

public ExecutorType getDefaultExecutorType ()

public Integer getDefaultFetchSize ()

public LanguageDriver getDefaultScriptingLanuageInstance ()

public Integer getDefaultStatementTimeout ()

public Environment getEnvironment ()

public Collection<CacheRefResolver> getIncompleteCacheRefs ()

public Collection<MethodResolver> getIncompleteMethods ()

public Collection<ResultMapResolver> getIncompleteResultMaps ()

public Collection<XMLStatementBuilder> getIncompleteStatements ()

public List<Interceptor> getInterceptors ()

public JdbcType getJdbcTypeForNull ()

public KeyGenerator getKeyGenerator (String id)

public Collection<String> getKeyGeneratorNames ()

public Collection<KeyGenerator> getKeyGenerators ()

public LanguageDriverRegistry getLanguageRegistry ()

public Set<String> getLazyLoadTriggerMethods ()

public LocalCacheScope getLocalCacheScope ()

public Class<? extends Log> getLogImpl ()

public String getLogPrefix ()

public MappedStatement getMappedStatement (String id)

public MappedStatement getMappedStatement (String id, boolean validateIncompleteStatements)

public Collection<String> getMappedStatementNames ()

public Collection<MappedStatement> getMappedStatements ()

public T getMapper (Class<T> type, SqlSession sqlSession)

public MapperRegistry getMapperRegistry ()

public ObjectFactory getObjectFactory ()

public ObjectWrapperFactory getObjectWrapperFactory ()

public ParameterMap getParameterMap (String id)

public Collection<String> getParameterMapNames ()

public Collection<ParameterMap> getParameterMaps ()

public ProxyFactory getProxyFactory ()

public ReflectorFactory getReflectorFactory ()

public ResultMap getResultMap (String id)

public Collection<String> getResultMapNames ()

public Collection<ResultMap> getResultMaps ()

public Map<String, XNode> getSqlFragments ()

public TypeAliasRegistry getTypeAliasRegistry ()

public TypeHandlerRegistry getTypeHandlerRegistry ()

public Properties getVariables ()

public Class<? extends VFS> getVfsImpl ()

public boolean hasCache (String id)

public boolean hasKeyGenerator (String id)

public boolean hasMapper (Class<?> type)

public boolean hasParameterMap (String id)

public boolean hasResultMap (String id)

public boolean hasStatement (String statementName, boolean validateIncompleteStatements)

public boolean hasStatement (String statementName)

public boolean isAggressiveLazyLoading ()

public boolean isCacheEnabled ()

public boolean isCallSettersOnNulls ()

public boolean isLazyLoadingEnabled ()

public boolean isMapUnderscoreToCamelCase ()

public boolean isMultipleResultSetsEnabled ()

public boolean isResourceLoaded (String resource)

public boolean isSafeResultHandlerEnabled ()

public boolean isSafeRowBoundsEnabled ()

public boolean isUseColumnLabel ()

public boolean isUseGeneratedKeys ()

public Executor newExecutor (Transaction transaction, ExecutorType executorType)

public Executor newExecutor (Transaction transaction)

public MetaObject newMetaObject (Object object)

public ParameterHandler newParameterHandler (MappedStatement mappedStatement, Object parameterObject, BoundSql boundSql)

public ResultSetHandler newResultSetHandler (Executor executor, MappedStatement mappedStatement, RowBounds rowBounds, ParameterHandler parameterHandler, ResultHandler resultHandler, BoundSql boundSql)

public StatementHandler newStatementHandler (Executor executor, MappedStatement mappedStatement, Object parameterObject, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql)

public void setAggressiveLazyLoading (boolean aggressiveLazyLoading)

public void setAutoMappingBehavior (AutoMappingBehavior autoMappingBehavior)

public void setAutoMappingUnknownColumnBehavior (AutoMappingUnknownColumnBehavior autoMappingUnknownColumnBehavior)

public void setCacheEnabled (boolean cacheEnabled)

public void setCallSettersOnNulls (boolean callSettersOnNulls)

public void setConfigurationFactory (Class<?> configurationFactory)

public void setDatabaseId (String databaseId)

public void setDefaultExecutorType (ExecutorType defaultExecutorType)

public void setDefaultFetchSize (Integer defaultFetchSize)

public void setDefaultScriptingLanguage (Class<?> driver)

public void setDefaultStatementTimeout (Integer defaultStatementTimeout)

public void setEnvironment (Environment environment)

public void setJdbcTypeForNull (JdbcType jdbcTypeForNull)

public void setLazyLoadTriggerMethods (Set<String> lazyLoadTriggerMethods)

public void setLazyLoadingEnabled (boolean lazyLoadingEnabled)

public void setLocalCacheScope (LocalCacheScope localCacheScope)

public void setLogImpl (Class<?> logImpl)

public void setLogPrefix (String logPrefix)

public void setMapUnderscoreToCamelCase (boolean mapUnderscoreToCamelCase)

public void setMultipleResultSetsEnabled (boolean multipleResultSetsEnabled)

public void setObjectFactory (ObjectFactory objectFactory)

public void setObjectWrapperFactory (ObjectWrapperFactory objectWrapperFactory)

public void setProxyFactory (ProxyFactory proxyFactory)

public void setReflectorFactory (ReflectorFactory reflectorFactory)

public void setSafeResultHandlerEnabled (boolean safeResultHandlerEnabled)

public void setSafeRowBoundsEnabled (boolean safeRowBoundsEnabled)

public void setUseColumnLabel (boolean useColumnLabel)

public void setUseGeneratedKeys (boolean useGeneratedKeys)

public void setVariables (Properties variables)

public void setVfsImpl (Class<?> vfsImpl)

Protected Methods

protected void buildAllStatements ()

protected void checkGloballyForDiscriminatedNestedResultMaps (ResultMap rm)

protected void checkLocallyForDiscriminatedNestedResultMaps (ResultMap rm)

protected String extractNamespace (String statementId)