Eclipse OR Tools: Libraries, Wizards, Java class/database mapping and velocity templates
This page presents an overview of JPA features available in
MyEclipse (based on MyEclipse 6.0). To
get a better feel for MyEclipse and to learn more about JPA or other features,
please check out the MyEclipse
Educational Materials.
MyEclipse provides support for the
Toplink Essentials and
Hibernate 3.2 JPA providers. Support for
OpenJPA is planned.
Adding JPA Capabilities
Database Configuration
Create a persistence unit and associate your project with a
database and schema for design-time tool support. The project in
the next screenshot is being associated with the database driver
for the local
MyEclipse Derby database.
Configure the datasource
You may change a JPA project's database driver association at any
time using the
Java Persistence properties page. To invoke this
page, right click on the project and select Properties from the
context menu. From the Properties dialog shown below, expand the
MyEclipse node and select Java Persistence.
Initiate Entity generation from the context menu of a JPA project.
This will launch the JPA Reverse Engineering Wizard.
Entity generation from JPA project
Entity generation can also be initiated from the Database
Browser view.
Entity generation from DB Table
The reverse engineering process is fully customizable. Using the
JPA Reverse Engineering Wizard you can choose the artifacts to
generate and the database tables from which the artifacts will be
based.
Customize reverse engineering
Following are several sample snippets of the code generated by
the Reverse Engineering Processor.
When adding JPA Capabilities to a project that already has Spring
capabilities or vice versa, you can choose advanced Spring-JPA
support. This level of support enables JPA tools to work with your
project's Spring artifacts. Following is a screenshot of the
Spring-JPA project configuration wizard.
Adding Spring Capabilities Wizard
Select your primary bean configuration file and customize bean Ids
and transaction support.
Configure Spring-JPA support
Reverse Engineering Entities and Spring DAOs from Database
For projects that are configured to support advanced Spring-JPA
capabilities, in addition to generating Entity classes from a
database schema, Spring compatible DAOs can be generated. During
the reverse-engineering process the Spring application context
file is updated with generated bean entries for each DOA class.
Generate Spring DAOs.
Generated Spring application context file.
Generated Spring DAO extends from Spring's
JpaDaoSupport.
MyEclipse Innovations
The innovation and application of Eclipse technology is Genuitec's sole business. With well over 4 million downloads, our MyEclipse Enterprise Workbench product has grown to be the most popular and successful Eclipse-based JEE IDE. Our long chain of Eclipse technology innovation includes:
First JSR-045 compliant source-level JSP debugger for Eclipse
First public article explaining that Eclipse could be used as a rich-client platform in early 2002
First commercial RCP applications shipped on Eclipse 2.0, well before the Eclipse 3.0 RCP