org.mybatis.spring.support
Class SqlSessionDaoSupport

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.mybatis.spring.support.SqlSessionDaoSupport
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean

public abstract class SqlSessionDaoSupport
extends org.springframework.dao.support.DaoSupport

Convenient super class for MyBatis SqlSession data access objects. It gives you access to the template which can then be used to execute SQL methods.

This class needs a SqlSessionTemplate or a SqlSessionFactory. If both are set the SqlSessionFactory will be ignored.

Version:
$Id: SqlSessionDaoSupport.java 2984 2010-10-31 20:08:05Z eduardo.macarron $
See Also:
setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory), setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate), SqlSessionTemplate, JdbcAccessor.setExceptionTranslator(org.springframework.jdbc.support.SQLExceptionTranslator)

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
SqlSessionDaoSupport()
           
 
Method Summary
protected  void checkDaoConfig()
          
 org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory()
           
 SqlSessionTemplate getSqlSessionTemplate()
           
 void setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)
           
 void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate)
           
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlSessionDaoSupport

public SqlSessionDaoSupport()
Method Detail

setSqlSessionFactory

public final void setSqlSessionFactory(org.apache.ibatis.session.SqlSessionFactory sqlSessionFactory)

getSqlSessionFactory

public final org.apache.ibatis.session.SqlSessionFactory getSqlSessionFactory()

setSqlSessionTemplate

public final void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate)

getSqlSessionTemplate

public final SqlSessionTemplate getSqlSessionTemplate()

checkDaoConfig

protected void checkDaoConfig()

Specified by:
checkDaoConfig in class org.springframework.dao.support.DaoSupport


Copyright © 2010 MyBatis.org. All Rights Reserved.