为Eclipse 添加 Abator —— IBatis 代码生成工具

Introduction to iBATOR

iBATOR is a code generator for iBATIS. iBATOR will introspect a database table (or many tables) and will generate iBATIS artifacts that can be used to access the table(s). This abates some of the initial nuisance of setting up objects and configuration files to interact with database tables. iBATOR seeks to make a major impact on the large percentage of database operations that are simple CRUD (Create, Retrieve, Update, Delete). You will still need to hand code SQL and objects for custom queries, or stored procedures.

iBATOR will generate:

  • SqlMap XML Files
  • Java Classes to match the primary key and fields of the table(s)
  • DAO Classes that use the above objects (optional)

iBATOR can run as a standalone JAR file, or as an Ant task, or as an Eclipse plugin.

iBATOR is currently under development. The legacy version (Abator) is still available. If you have suggestions for the future of iBATOR, please feel free to send them to the Java user's mailing list..


Eclipse Plugin

When run as an Eclipse plugin, Abator will persist the generated Java classes and SqlMap files in Eclipse projects. Abator can be run iteratively multiple time as the database design matures - and any hand coded additions to generated Java classes or SqlMap files will remain undisturbed.

Documentation for Abator is integrated into the Eclipse help system.

Requirements

  • Eclipse 3.2 or higher (Note: if you are stuck on Eclipse 3.0, or version 6.0 of the Rational development tools, the prior version of the plugin is still available on the update site)
  • JDK 1.4 or Higher

Automatic Eclipse Install

If you've already installed a prior version of Abator, simply run the Eclipse Install/Update tool and the new version will be found automatically.

If you've not already installed Abator, then you can use the built in Eclipse install support by following these steps:

  1. Take the "Help>Software Updates>Find and Install" Menu Option
  2. Select the "Search for new features to install" radio button, press "Next"
  3. Press the "New Remote Site" button
  4. Enter the following information:
    Name:
    Abator for Eclipse Update Site
    URL:
    http://ibatis.apache.org/tools/abator
  5. Press OK
  6. Check the box next to "Abator for Eclipse Update Site"
  7. Follow the remainder of the install wizard

Manual Eclipse Install

The automatic install is much preferred, but you can also install Abator manually if you desire. To install manually, download the file AbatorForEclipse1.1.0.zip and unzip the file to some convenient location. After unzipping the update site archive, follow these steps in Eclipse:

  1. Take the "Help>Software Updates>Find and Install" Menu Option
  2. Select the "Search for new features to install" radio button, press "Next"
  3. Press the "New Local Site" button
  4. Navigate to the location where you unzipped the file.
  5. Press OK
  6. Follow the remainder of the install wizard


你可能感兴趣的:(eclipse)