File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Auto code Generation tool for entity classes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Auto code Generation tool for entity classes " Watch "Auto code Generation tool for entity classes " New topic
Author

Auto code Generation tool for entity classes

sumatheja dasararaju
Greenhorn

Joined: May 24, 2010
Posts: 9
Hi,
Can anyone help me to know if there is any tools available which can create entity classes and relations by connecting to the DB. ANy help is much appreciated.

cheers
Sumatheja


sumatheja
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 508

Which IDE are you using?
Also which DB are you using?


If you are not laughing at yourself, then you just didn't get the joke.
sumatheja dasararaju
Greenhorn

Joined: May 24, 2010
Posts: 9
Hi Thanks for the reply. I am using Eclipse Helios and oracle 10g.
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 508

Did you try this eclipse plug-in - http://hibernator.sourceforge.net/
There are other eclipse plug-ins which let you to connect to database and reverse engineer from the tables.

1. http://www.hibernate.org/subprojects/tools.html
2. http://sourceforge.net/projects/hibernator/
sumatheja dasararaju
Greenhorn

Joined: May 24, 2010
Posts: 9
Hi Arun,
I tried using hibernate reverse engineer tool but the schema is not getting loaded and there's no clear documentation or tutorials for this.
Christian Gossart
Ranch Hand

Joined: Mar 13, 2008
Posts: 34
Hi,

Using Eclipse, there are several plugins to generate JPA entities from an existing database. I would add Dali to those listed by Arun.
AFAIK, these tools will produce a one-shot reverse of your database. If your need is to reverse a changing database using bottom-up strategy, you'll have to be careful to any change you add manually to the generated entities: they will be lost each time you reverse the schema.



Christian Gossart
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 508

Did you specify the driver information, the exact URL with schema details, userId and password?
May be the userId and password which you're using to login doesn't have access to the required schema.
Can you post some screenshot and what errors are you getting?
sumatheja dasararaju
Greenhorn

Joined: May 24, 2010
Posts: 9
Hi Guys,
Thanks for your help. The issue was reading oracle meta info was taking a long time. Hibernate reverse engineer worked well for me.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Auto code Generation tool for entity classes
 
Similar Threads
List of entity types registered in hibernate
Find @Entity classes in current project
in Eclipse how to create DAO classes from Entity classes with JPA Technology
Can EJB3 generate DDL?
Non-Entity Classes in the Entity Inheritance Hierarchy