XML Configuration File Reference

In the normal use case, Abator is driven by an XML configuration file. The configuration file tells Abator:

At this point, the best reference for the XML configuration file is the annotated DTD. The following is an example abator configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE abatorConfiguration
  PUBLIC "-//Apache Software Foundation//DTD Abator for iBATIS Configuration 1.0//EN"
  "http://ibatis.apache.org/dtd/abator-config_1_0.dtd">

<abatorConfiguration>
  <abatorContext id="DB2Tables">
    <jdbcConnection driverClass="COM.ibm.db2.jdbc.app.DB2Driver"
        connectionURL="jdbc:db2:JGBTEST"
        userId="db2admin"
        password="db2admin">
      <classPathEntry location="/Program Files/IBM/SQLLIB/java/db2java.zip" />
    </jdbcConnection>
  
    <javaTypeResolver >
      <property name="forceBigDecimals" value="false" />  <!-- default is false -->
    </javaTypeResolver>
  
    <javaModelGenerator targetPackage="test.model" targetProject="Abator Test Project">
      <property name="enableSubPackages" value="true" /> <!-- default is false -->
      <property name="trimStrings" value="true" /> <!-- default is false -->
    </javaModelGenerator>
  
    <sqlMapGenerator targetPackage="test.xml"  targetProject="Abator Test Project">
      <property name="enableSubPackages" value="true" /> <!-- default is false -->
    </sqlMapGenerator>
  
    <daoGenerator type="IBATIS" targetPackage="test.dao"  targetProject="Abator Test Project">
      <property name="enableSubPackages" value="true" /> <!-- default is false -->
    </daoGenerator>
  
    <table schema="DB2ADMIN" tableName="ALLTYPES" domainObjectName="Customer" >
      <property name="useActualColumnNames" value="true"/> <!-- default is false -->
      <generatedKey column="ID" sqlStatement="DB2" identity="true" />
      <columnOverride column="DATE_FIELD" property="startDate" />
      <ignoreColumn column="FRED" />
      <columnOverride column="LONG_VARCHAR_FIELD" jdbcType="VARCHAR" />
    </table>
  
  </abatorContext>
</abatorConfiguration>

Important notes about this file follow: