Summary | Admin | Home Page | Forums | Tracker | Bugs | Support | Patches | RFE | Lists | Tasks | Docs | News | CVS | Files

Overview

Hloader is a pure Java tool for loading Domain Objects represented as XML files into hibernate objects. 

Agile projects using Hibernate typically use JavaBeans to define their Domain Objects. Domain Objects typically represent  a table in a relational database. A Hibenate mapping file is created (either directly or automatically using hibernatedoclet) which provides the additional information, such as table, column names, relationships with other tables etc to allow Hibernate to read and write the Domain Objects to and from a database. Hibernate generates schemas, permitting new versions of schema objects to be readily created.

Having generated a schema, they are often populated with test data. Until now this bootstrap data has had to be specified as sql scripts. These sql scripts are then loaded into a database using the Ant SQL task.

Changes to the Domain Objects then invalidate the sql scripts. Say a column is added. The sql insert statement must be changed to add a column in the correct position. Then the value for the column must be added in the right position.  This is a tedious and error prone process.  Each sql statement must honour referential integrity. Rows in tables with foreign keys must exist first. As the sql setup data gets larger the maintenance of the insert scripts gets harder and harder.

Hloader remedies this situation by letting setup data be specified as Domain Objects. They are specified in an XML file. Hloader instantiates Java Domain Objects from the XML file and then uses Hibernate to persist them to the specified database. Most changes to Domain Objects require no change at all to the XML file.

In this way hloader takes the pain out of setup data.

Features

Hloader has the following features:
  1. Simple and easy to use
  2. Fast to create setup data and maintain it
  3. Loads Domain Objects for Hibernate 3.1. Version 0.7 supports Hibernate 3.0 and version 0.6 works with Hibernate 2 and 2.1.
  4. Replacement for the Ant SQL task.
  5. Supports Oracle, MySQL, Sql Server and HSQLDB. Readily extensible to other databases.
  6. Comes with an Ant taskdef for Ant script inclusion. Can also be run programmatically.
  7. Uses Jelly to create powerful macros.
  8. Minimal dependencies.
  9. Fully documented. See the online Documentation and the online JavaDoc.
  10. Comprehensive Test Coverage. 
  11. Available under the Apache 1.1 license. Hloader's copyright and licensing have had legal review, making hloader suitable for use in Apache projects.
  12. Tested. All versions of hloader are tested for several weeks on a large and complex project before release.

News Highlights

4 May 2006. hloader 0.8 released. Minor release to support Hibernate3.1
14 August 2005. hloader 0.7 released. Hloader now supports Hibernate3, and works with Oracle, MySQL, SQLServer and HSQLDB. Extensive documentation has been created to allow new users to get going.
9 August 2004. hloader 0.6 released. The team feels that hloader is now ready for a  wider audience.  Enjoy!

Downloads

Download hloader

Contributions


The hloader project gratefully acknowledges the contribution of wotif.com, who granted a license to the authors to in respect of code developed at wotif.com for the purpose of making it available to the community under an Apache open source license.

Thanks to ThoughtWorks for free legal assistance in formalising the granting of code from wotif.com to the open source community. Copies of  the executed deeds are available should anyone need to audit the grant.

About the hloader Name and Logo

hloader is a utility for Hibernate to load domain objects. While not a formal part of the Hibernate project, hloader is only useful for a project using Hibernate for persistence. Thus the name.

The logo is meant to look like an asphalt cutter/loader. The balls are objects in unserialized form. The conveyor belt loads the objects into the hopper.


 SourceForge.net