Class HierarchicalXMLConfigBuilder

java.lang.Object
org.apache.ibatis.builder.BaseBuilder
org.alfresco.ibatis.HierarchicalXMLConfigBuilder

public class HierarchicalXMLConfigBuilder extends org.apache.ibatis.builder.BaseBuilder
Extends the MyBatis XMLConfigBuilder to allow the selection of a ResourceLoader that will be used to load the resources specified in the mapper's resource.

By using the resource.dialect placeholder with hierarchical resource loading, different resource files can be picked up for different dialects. This reduces duplication when supporting multiple database configurations.

 <configuration>
    <mappers>
        <mapper resource="org/x/y/#resource.dialect#/View1.xml"/>
        <mapper resource="org/x/y/#resource.dialect#/View2.xml"/>
    </mappers>
 </configuration>
 

Much of the implementation is a direct copy of the MyBatis XMLConfigBuilder; some of the protected methods do not have access to the object's state and can therefore not be overridden successfully: IBATIS-589 Pending a better way to extend/override, much of the implementation is a direct copy of the MyBatis SqlSessionFactoryBean; some of the protected methods do not have access to the object's state and can therefore not be overridden successfully. This is equivalent to HierarchicalSqlMapConfigParser which extended iBatis (2.x). See also: IBATIS-589 and: <a href=http://code.google.com/p/mybatis/issues/detail?id=21

Since:
4.0
Author:
Derek Hulley, janv
  • Field Summary

    Fields inherited from class org.apache.ibatis.builder.BaseBuilder

    configuration, typeAliasRegistry, typeHandlerRegistry
  • Constructor Summary

    Constructors
    Constructor
    Description
    HierarchicalXMLConfigBuilder(HierarchicalResourceLoader resourceLoader, InputStream inputStream, String environment, Properties props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.ibatis.session.Configuration
     

    Methods inherited from class org.apache.ibatis.builder.BaseBuilder

    booleanValueOf, createInstance, getConfiguration, integerValueOf, parseExpression, resolveAlias, resolveClass, resolveJdbcType, resolveParameterMode, resolveResultSetType, resolveTypeHandler, resolveTypeHandler, stringSetValueOf

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • parse

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