Pavel Buzek's Weblog

All | JavaEE5 | netbeans
« Previous day (Jan 26, 2006) | Main | Next day (Jan 27, 2006) »
20060127 e premte janar 27, 2006

Generate entity classes from DB


The last entry was about auto generation of DB tables for entity classes in Glassfish. Now, in turn, we have something cool to show you in NetBeans JavaEE 5 build. We have implemented a wizard that generates entity classes from existing database tables. The generator calculates closure of tables based on foreign keys. It generates nice Java friendly names, for example if the database has "CUSTOMER_ID" it will use getCustomerId() for the getter and uses mapping annotations, e.g. @Column(name = "CUSTOMER_ID", nullable = false). It also generates annotations for all relationships, etc.

A picture is worth thousand words:

Get a build of Java EE 5 (see the link in the up right corner) and test it on your database. Send feedback or file bugz. Thanks.


( Jan 27 2006, 02:13:12 PD EST ) Permalink Comments [2]

Download NetBeans IDE

Calendar

RSS Feeds

Recent Entries

Blogs

Search

Navigation

Referers