Copyright © tutorialspoint.com

iBATOR - XML Configuration File Reference

previous next


Advertisements

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

The following is an example abator configuration file. See the individual pages for each element for more information about the elements and the values of the attributes.

You can see detail of all the tags used in this file at : iBATOR Documentation.

<?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" generatorSet="Java2">
    <jdbcConnection 
        driverClass="COM.ibm.db2.jdbc.app.DB2Driver"
        connectionURL="jdbc:db2:TEST"
        userId="db2admin"
        password="db2admin">
        <classPathEntry 
        location="/Program Files/java/db2java.zip" />
    </jdbcConnection>

    <javaTypeResolver >
      <property name="forceBigDecimals" value="false" />
    </javaTypeResolver>

    <javaModelGenerator targetPackage="test.model" 
      targetProject="\AbatorTestProject\src">
      <property name="enableSubPackages" value="true" />
      <property name="trimStrings" value="true" />
    </javaModelGenerator>

    <sqlMapGenerator targetPackage="test.xml"  
      targetProject="\AbatorTestProject\src">
      <property name="enableSubPackages" value="true" />
    </sqlMapGenerator>

    <daoGenerator type="SPRING" targetPackage="test.dao"  
      targetProject="\AbatorTestProject\src">
      <property name="enableSubPackages" value="true" />
    </daoGenerator>

    <table schema="DB2ADMIN" tableName="ALLTYPES" 
      domainObjectName="Customer" >
      <property name="useActualColumnNames" value="true"/>
      <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>

previous next

Copyright © tutorialspoint.com