|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.inject.AbstractModule
org.mybatis.guice.MyBatisModule
public abstract class MyBatisModule
Easy to use helper Module that alleviates users to write the boilerplate google-guice bindings to create the SqlSessionFactory.
| Constructor Summary | |
|---|---|
MyBatisModule()
|
|
| Method Summary | |
|---|---|
protected AliasBinder |
addAlias(String alias)
Add a user defined binding. |
protected void |
addInterceptorClass(Class<? extends org.apache.ibatis.plugin.Interceptor> interceptorClass)
Adds the user defined myBatis interceptor plugins type, letting google-guice creating it. |
protected void |
addInterceptorsClasses(Collection<Class<? extends org.apache.ibatis.plugin.Interceptor>> interceptorsClasses)
Adds the user defined MyBatis interceptors plugins types, letting google-guice creating them. |
protected void |
addInterceptorsClasses(String packageName)
Adds the user defined MyBatis interceptors plugins types in the given package, letting google-guice creating them. |
protected void |
addMapperClass(Class<?> mapperClass)
Adds the user defined mapper classes. |
protected void |
addMapperClasses(Collection<Class<?>> mapperClasses)
Adds the user defined mapper classes. |
protected void |
addMapperClasses(String packageName)
Adds the user defined mapper classes. |
protected void |
addMapperClasses(String packageName,
org.apache.ibatis.io.ResolverUtil.Test test)
Adds the user defined mapper classes. |
protected void |
addSimpleAlias(Class<?> type)
Adding simple aliases means that every specified class will be bound using the simple class name, i.e. |
protected void |
addSimpleAliases(Collection<Class<?>> types)
Adding simple aliases means that every specified class will be bound using the simple class name, i.e. |
protected void |
addSimpleAliases(String packageName)
Adds all Classes in the given package as a simple alias. |
protected void |
addSimpleAliases(String packageName,
org.apache.ibatis.io.ResolverUtil.Test test)
Adds all Classes in the given package as a simple alias. |
protected void |
aggressiveLazyLoading(boolean aggressiveLazyLoading)
|
protected void |
autoMappingBehavior(org.apache.ibatis.session.AutoMappingBehavior autoMappingBehavior)
|
protected void |
bindDataSourceProvider(javax.inject.Provider<DataSource> dataSourceProvider)
|
protected void |
bindDataSourceProvider(com.google.inject.Provider<DataSource> dataSourceProvider)
|
protected void |
bindDataSourceProviderType(Class<? extends javax.inject.Provider<DataSource>> dataSourceProviderType)
Set the DataSource Provider type has to be bound. |
protected void |
bindObjectFactoryType(Class<? extends org.apache.ibatis.reflection.factory.ObjectFactory> objectFactoryType)
Sets the ObjectFactory class. |
protected void |
bindTransactionFactory(javax.inject.Provider<org.apache.ibatis.transaction.TransactionFactory> transactionFactoryProvider)
|
protected void |
bindTransactionFactory(com.google.inject.Provider<org.apache.ibatis.transaction.TransactionFactory> transactionFactoryProvider)
|
protected void |
bindTransactionFactoryType(Class<? extends org.apache.ibatis.transaction.TransactionFactory> transactionFactoryType)
Set the TransactionFactory type has to be bound. |
protected void |
configure()
|
protected void |
environmentId(String environmentId)
Set the MyBatis configuration environment id. |
protected void |
executorType(org.apache.ibatis.session.ExecutorType executorType)
|
protected void |
failFast(boolean failFast)
|
protected TypeHandlerBinder |
handleType(Class<?> type)
Add a user defined Type Handler letting google-guice creating it. |
protected abstract void |
initialize()
|
protected void |
lazyLoadingEnabled(boolean lazyLoadingEnabled)
|
protected void |
multipleResultSetsEnabled(boolean multipleResultSetsEnabled)
|
protected void |
useCacheEnabled(boolean useCacheEnabled)
|
protected void |
useColumnLabel(boolean useColumnLabel)
|
protected void |
useGeneratedKeys(boolean useGeneratedKeys)
|
| Methods inherited from class com.google.inject.AbstractModule |
|---|
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MyBatisModule()
| Method Detail |
|---|
protected final void environmentId(String environmentId)
environmentId - the MyBatis configuration environment idprotected final void lazyLoadingEnabled(boolean lazyLoadingEnabled)
lazyLoadingEnabled - protected final void aggressiveLazyLoading(boolean aggressiveLazyLoading)
aggressiveLazyLoading - protected final void multipleResultSetsEnabled(boolean multipleResultSetsEnabled)
multipleResultSetsEnabled - protected final void useGeneratedKeys(boolean useGeneratedKeys)
useGeneratedKeys - protected final void useColumnLabel(boolean useColumnLabel)
useColumnLabel - protected final void useCacheEnabled(boolean useCacheEnabled)
useCacheEnabled - protected final void failFast(boolean failFast)
failFast - protected final void executorType(org.apache.ibatis.session.ExecutorType executorType)
executorType - protected final void autoMappingBehavior(org.apache.ibatis.session.AutoMappingBehavior autoMappingBehavior)
autoMappingBehavior - protected final void bindDataSourceProviderType(Class<? extends javax.inject.Provider<DataSource>> dataSourceProviderType)
dataSourceProviderType - the DataSource Provider typeprotected final void bindDataSourceProvider(javax.inject.Provider<DataSource> dataSourceProvider)
dataSourceProvider - protected final void bindDataSourceProvider(com.google.inject.Provider<DataSource> dataSourceProvider)
dataSourceProvider - protected final void bindTransactionFactoryType(Class<? extends org.apache.ibatis.transaction.TransactionFactory> transactionFactoryType)
transactionFactoryType - the TransactionFactory typeprotected final void bindTransactionFactory(javax.inject.Provider<org.apache.ibatis.transaction.TransactionFactory> transactionFactoryProvider)
transactionFactoryProvider - protected final void bindTransactionFactory(com.google.inject.Provider<org.apache.ibatis.transaction.TransactionFactory> transactionFactoryProvider)
transactionFactoryProvider - protected final void bindObjectFactoryType(Class<? extends org.apache.ibatis.reflection.factory.ObjectFactory> objectFactoryType)
objectFactoryType - the ObjectFactory typeprotected final AliasBinder addAlias(String alias)
alias - the string type aliasclazz - the type has to be bound.protected final void addSimpleAlias(Class<?> type)
com.acme.Foo becomes Foo.
types - the specified types have to be bindprotected final void addSimpleAliases(Collection<Class<?>> types)
com.acme.Foo becomes Foo.
types - the specified types have to be bind
protected final void addSimpleAliases(String packageName,
org.apache.ibatis.io.ResolverUtil.Test test)
com.acme.Foo becomes Foo.
packageName - the specified package to search for classes to alias.test - a test to run against the objects found in the specified packageprotected final void addSimpleAliases(String packageName)
com.acme.Foo becomes Foo.
packageName - the specified package to search for classes to aliasprotected final TypeHandlerBinder handleType(Class<?> type)
type - the specified type has to be handled.handler - the handler type.protected final void addInterceptorClass(Class<? extends org.apache.ibatis.plugin.Interceptor> interceptorClass)
interceptorClasse - The user defined MyBatis interceptor plugin typeprotected final void addInterceptorsClasses(Collection<Class<? extends org.apache.ibatis.plugin.Interceptor>> interceptorsClasses)
interceptorsClasses - the user defined MyBatis Interceptors plugins typesprotected final void addInterceptorsClasses(String packageName)
packageName - the package where looking for Interceptors plugins types.protected final void addMapperClass(Class<?> mapperClass)
mapperClasses - the user defined mapper classes.protected final void addMapperClasses(Collection<Class<?>> mapperClasses)
mapperClasses - the user defined mapper classesprotected final void addMapperClasses(String packageName)
packageName - the specified package to search for mappers to add.
protected final void addMapperClasses(String packageName,
org.apache.ibatis.io.ResolverUtil.Test test)
packageName - the specified package to search for mappers to add.test - a test to run against the objects found in the specified package.protected final void configure()
configure in class com.google.inject.AbstractModuleprotected abstract void initialize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||