Gugan Mohan
Gugan Mohan

Reputation: 1645

Creating JPA from database

I know this is a duplicate question. But even i couldn't find any tool to create JPA entity file from database source. I used eclipse to do this. I only got DTO kind of classes with getters & setters. Can anyone suggest some tools that create DAO files too.

TIA

Upvotes: 4

Views: 1679

Answers (3)

John T
John T

Reputation: 713

You can use Telosys Tools, an Eclipse plugin working from an existing database with customizable Velocity templates

See: https://sites.google.com/site/telosystools/

Eclipse Marketplace : http://marketplace.eclipse.org/content/telosys-tools

For JPA generation, use the JPA set of templates available on GitHub : https://github.com/telosys-tools

Upvotes: 4

xflorian
xflorian

Reputation: 365

Minuteproject is a generator tool and can generate JPA2 artifacts from Database.

You can instruct the generator to apply convention for your java code that do not follow your DB convention, but the mapping will be correct. (Example strip DB name prefix; table starting with ADMIN_ such as ADMIN_ENVIRONMENT are Environment (w/out Admin) as java class) For the moment there 20+ conventions that help you reshape your model to be less DB look-and-feel by more Java-OO-friendly.

If you want DAO minuteproject has a track BSLA that generate spring-integrated DAO

Upvotes: 0

umert
umert

Reputation: 138

you can use netbeans instead of eclipse. After you create own project, you can select "JPA controller classes from entity classes" in netbeans menu. For example http://ensode.net/roller/dheffelfinger/entry/automated_dao_generation_from_jpa

Upvotes: 1

Related Questions