org.mybatis.guice
Class XMLMyBatisModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.mybatis.guice.XMLMyBatisModule
All Implemented Interfaces:
com.google.inject.Module

public abstract class XMLMyBatisModule
extends com.google.inject.AbstractModule

Easy to use helper Module that alleviates users to write the boilerplate google-guice bindings to create the SqlSessionFactory, via XML configuration.

Version:
$Id: XMLMyBatisModule.java 3714 2011-03-19 20:18:34Z simone.tripodi $

Constructor Summary
XMLMyBatisModule()
           
 
Method Summary
protected  void addProperties(Properties properties)
          Add the variables will be used to replace placeholders in the MyBatis configuration.
protected  void configure()
          
protected abstract  void initialize()
           
protected  void setClassPathResource(String classPathResource)
          Set the MyBatis configuration class path resource.
protected  void setEnvironmentId(String environmentId)
          Set the MyBatis configuration environment id.
 
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

XMLMyBatisModule

public XMLMyBatisModule()
Method Detail

setClassPathResource

protected final void setClassPathResource(String classPathResource)
Set the MyBatis configuration class path resource.

Parameters:
classPathResource - the MyBatis configuration class path resource

setEnvironmentId

protected final void setEnvironmentId(String environmentId)
Set the MyBatis configuration environment id.

Parameters:
environmentId - the MyBatis configuration environment id

addProperties

protected final void addProperties(Properties properties)
Add the variables will be used to replace placeholders in the MyBatis configuration.

Parameters:
properties - the variables will be used to replace placeholders in the MyBatis configuration

configure

protected final void configure()

Specified by:
configure in class com.google.inject.AbstractModule

initialize

protected abstract void initialize()


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