org.alfresco.ibatis
Class HierarchicalSqlMapClientFactoryBean

java.lang.Object
  extended by org.springframework.orm.ibatis.SqlMapClientFactoryBean
      extended by org.alfresco.ibatis.HierarchicalSqlMapClientFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean, org.springframework.beans.factory.InitializingBean

public class HierarchicalSqlMapClientFactoryBean
extends org.springframework.orm.ibatis.SqlMapClientFactoryBean

Extends Spring's support for iBatis by allowing a choice of ResourceLoader. The ResourceLoader will be used to load the SqlMapConfig file, but will also be injected into a HierarchicalSqlMapConfigParser that will read the individual iBatis resources.

Since:
3.2 (Mobile)

Constructor Summary
HierarchicalSqlMapClientFactoryBean()
          Default constructor
 
Method Summary
 void afterPropertiesSet()
           
protected  com.ibatis.sqlmap.client.SqlMapClient buildSqlMapClient(org.springframework.core.io.Resource[] configLocations, org.springframework.core.io.Resource[] mappingLocations, java.util.Properties properties)
           
 void setResourceLoader(HierarchicalResourceLoader resourceLoader)
          Set the resource loader to use.
 
Methods inherited from class org.springframework.orm.ibatis.SqlMapClientFactoryBean
applyTransactionConfig, getConfigTimeLobHandler, getObject, getObjectType, isSingleton, setConfigLocation, setConfigLocations, setDataSource, setLobHandler, setMappingLocations, setSqlMapClientProperties, setTransactionConfigClass, setTransactionConfigProperties, setUseTransactionAwareDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalSqlMapClientFactoryBean

public HierarchicalSqlMapClientFactoryBean()
Default constructor

Method Detail

setResourceLoader

public void setResourceLoader(HierarchicalResourceLoader resourceLoader)
Set the resource loader to use. To use the #resource.dialect# placeholder, use the HierarchicalResourceLoader.

Parameters:
resourceLoader - the resource loader to use

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class org.springframework.orm.ibatis.SqlMapClientFactoryBean
Throws:
java.lang.Exception

buildSqlMapClient

protected com.ibatis.sqlmap.client.SqlMapClient buildSqlMapClient(org.springframework.core.io.Resource[] configLocations,
                                                                  org.springframework.core.io.Resource[] mappingLocations,
                                                                  java.util.Properties properties)
                                                           throws java.io.IOException
Overrides:
buildSqlMapClient in class org.springframework.orm.ibatis.SqlMapClientFactoryBean
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.