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.

Comments:

Good, good and expected ! 1) What we expect aswell is to handle column-adding. - Let say we've added a column (on a already generated table) - It should appear as 'non selected' and when selected - The wizard would only make the necessary update AFA this/these column(s) are concerned 2) column delete should be handled : - they should appear as deleted - ...

Posted by sse on janar 27, 2006 at 02:30 PD EST #

It needs to allow you to pick the classname and method names instead of guessing for you. It also generates duplicate classes if you refactored the object name. It should use the table name annotation not the classname for dup checking. It would also be nice to be able to edit relationships prior to generation. ie leave out a relationship, set load styles and direction. Thanks for all of the hard work, this is a MAJOR feature in my opion. Good work.

Posted by James Nelson on janar 27, 2006 at 05:16 MD EST #

Post a Comment:
Comments are closed for this entry.
About

pavel

Search

Categories
Archives
« prill 2014
DieHënMarMërEnjPreSht
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today