org.apache.ibatis.abator.api
Class Abator

java.lang.Object
  extended by org.apache.ibatis.abator.api.Abator

public class Abator
extends java.lang.Object

This class is the main interface to the Abator for iBATIS code generator. A typical execution of the tool involves these steps:

  1. Create an AbatorConfiguration object. The AbatorConfiguration can be the result of a parsing the XML configuration file, or it can be created solely in Java.
  2. Create an Abator object
  3. Call the generate() method

Author:
Jeff Butler
See Also:
AbatorConfigurationParser

Constructor Summary
Abator(AbatorConfiguration abatorConfiguration, ShellCallback shellCallback, java.util.List warnings)
          Constructs an Abator object.
 
Method Summary
 void generate(ProgressCallback callback)
          This is the main method for generating code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Abator

public Abator(AbatorConfiguration abatorConfiguration,
              ShellCallback shellCallback,
              java.util.List warnings)
Constructs an Abator object.

Parameters:
abatorConfiguration - The configuration for this run of Abator
shellCallback - an instance of a ShellCallback interface. You may specify null in which case Abator will use the DefaultShellCallback.
warnings - Any warnings generated during execution will be added to this list. Warnings do not affect the running of the tool, but they may affect the results. A typical warning is an unsupported data type. In that case, the column will be ignored and generation will continue. Abator will only add Strings to the list. You may specify null if you do not want warnings returned.
Method Detail

generate

public void generate(ProgressCallback callback)
              throws InvalidConfigurationException,
                     java.sql.SQLException,
                     java.io.IOException,
                     java.lang.InterruptedException
This is the main method for generating code. This method is long running, but progress can be provided and the method can be calncelled through the ProgressCallbac interface.

Parameters:
callback - an instance of the ProgressCallback interface, or null if you do not require progress information
Throws:
InvalidConfigurationException
java.sql.SQLException
java.io.IOException
java.lang.InterruptedException - if the method is cancelled through the ProgressCallback