org.mybatis.guice.configuration
Class ConfigurationProvider

java.lang.Object
  extended by org.mybatis.guice.configuration.ConfigurationProvider
All Implemented Interfaces:
javax.inject.Provider<org.apache.ibatis.session.Configuration>

@Singleton
public final class ConfigurationProvider
extends Object
implements javax.inject.Provider<org.apache.ibatis.session.Configuration>

Provides the myBatis Configuration.

Version:
$Id: ConfigurationProvider.java 3692 2011-03-16 17:35:33Z simone.tripodi $

Constructor Summary
ConfigurationProvider(org.apache.ibatis.mapping.Environment environment)
           
 
Method Summary
 org.apache.ibatis.session.Configuration get()
          
 void registerTypeHandlers(Map<Class<?>,org.apache.ibatis.type.TypeHandler> typeHandlers)
          Adds the user defined type handlers to the myBatis Configuration.
protected  void setAggressiveLazyLoading(boolean aggressiveLazyLoading)
           
protected  void setAutoMappingBehavior(org.apache.ibatis.session.AutoMappingBehavior autoMappingBehavior)
           
protected  void setCacheEnabled(boolean cacheEnabled)
           
protected  void setDefaultExecutorType(org.apache.ibatis.session.ExecutorType defaultExecutorType)
           
 void setEnvironment(org.apache.ibatis.mapping.Environment environment)
          Deprecated. 
 void setFailFast(boolean failFast)
          Flag to check all statements are completed.
 void setLazyLoadingEnabled(boolean lazyLoadingEnabled)
           
 void setMapperClasses(Set<Class<?>> mapperClasses)
          Adds the user defined Mapper classes to the myBatis Configuration.
protected  void setMultipleResultSetsEnabled(boolean multipleResultSetsEnabled)
           
 void setObjectFactory(org.apache.ibatis.reflection.factory.ObjectFactory objectFactory)
          Adds the user defined ObjectFactory to the myBatis Configuration.
 void setPlugins(Set<org.apache.ibatis.plugin.Interceptor> plugins)
          Registers the user defined plugins interceptors to the myBatis Configuration.
 void setTypeAliases(Map<String,Class<?>> typeAliases)
          Adds the user defined type aliases to the myBatis Configuration.
protected  void setUseColumnLabel(boolean useColumnLabel)
           
protected  void setUseGeneratedKeys(boolean useGeneratedKeys)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationProvider

@Inject
public ConfigurationProvider(org.apache.ibatis.mapping.Environment environment)
Since:
1.0.1
Method Detail

setEnvironment

@Deprecated
public void setEnvironment(org.apache.ibatis.mapping.Environment environment)
Deprecated. 


setLazyLoadingEnabled

public void setLazyLoadingEnabled(boolean lazyLoadingEnabled)
Since:
1.0.1

setAggressiveLazyLoading

protected void setAggressiveLazyLoading(boolean aggressiveLazyLoading)
Since:
1.0.1

setMultipleResultSetsEnabled

protected void setMultipleResultSetsEnabled(boolean multipleResultSetsEnabled)
Since:
1.0.1

setUseGeneratedKeys

protected void setUseGeneratedKeys(boolean useGeneratedKeys)
Since:
1.0.1

setUseColumnLabel

protected void setUseColumnLabel(boolean useColumnLabel)
Since:
1.0.1

setCacheEnabled

protected void setCacheEnabled(boolean cacheEnabled)
Since:
1.0.1

setDefaultExecutorType

protected void setDefaultExecutorType(org.apache.ibatis.session.ExecutorType defaultExecutorType)
Since:
1.0.1

setAutoMappingBehavior

protected void setAutoMappingBehavior(org.apache.ibatis.session.AutoMappingBehavior autoMappingBehavior)
Since:
1.0.1

setFailFast

public void setFailFast(boolean failFast)
Flag to check all statements are completed.

Parameters:
failFast - flag to check all statements are completed
Since:
1.0.1

setTypeAliases

public void setTypeAliases(Map<String,Class<?>> typeAliases)
Adds the user defined type aliases to the myBatis Configuration.

Parameters:
typeAliases - the user defined type aliases.

registerTypeHandlers

@Inject(optional=true)
public void registerTypeHandlers(Map<Class<?>,org.apache.ibatis.type.TypeHandler> typeHandlers)
Adds the user defined type handlers to the myBatis Configuration.

Parameters:
typeHandlers - the user defined type handlers.

setMapperClasses

public void setMapperClasses(Set<Class<?>> mapperClasses)
Adds the user defined Mapper classes to the myBatis Configuration.

Parameters:
mapperClasses - the user defined Mapper classes.

setObjectFactory

public void setObjectFactory(org.apache.ibatis.reflection.factory.ObjectFactory objectFactory)
Adds the user defined ObjectFactory to the myBatis Configuration.

Parameters:
objectFactory -

setPlugins

public void setPlugins(Set<org.apache.ibatis.plugin.Interceptor> plugins)
Registers the user defined plugins interceptors to the myBatis Configuration.

Parameters:
plugins - the user defined plugins interceptors.

get

public org.apache.ibatis.session.Configuration get()

Specified by:
get in interface javax.inject.Provider<org.apache.ibatis.session.Configuration>


Copyright © 2010-2011 MyBatis.org. All Rights Reserved.