13
Dali JPA Tools

Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Embed Size (px)

Citation preview

Page 1: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Dali JPA Tools

Page 2: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

About Dali• Dali JPA Tools is an Eclipse Web Tools Platform

sub-Project• Dali 1.0 is a part of WTP 2.0 Europa coordinated

release• Goal - to build extensible frameworks and

exemplary tools for the definition and editing of object-relational mappings for JPA Entities

• Provide creation and automated initial mapping wizards, programming assistance such as dynamic problem identification

Page 3: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Dali Goals• Simplicity

• Automated mapping wizards and intelligent mapping assistance

• Intuitiveness• Use existing and consistent modelling and tooling

practices in Eclipse• Compliance

• Support any and all Java Persistence API compliant runtime implementations

• Test using EJB 3.0 JPA Reference Implementation• Extensibility

• Provide extension points for vendors and open source projects to add their own value-add features

Page 4: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Information• Dali Web Site:

http://www.eclipse.org/webtools/dali/main.php

• Dali User’s Guide:http://www.eclipse.org/webtools/dali/docs/dali_user_guide.pdf

• Dali Tutorial:http://www.eclipse.org/webtools/dali/docs/tutorial_1.0/dali_jsf_tutorial.pdf

• Dali Developer Documentation http://wiki.eclipse.org/index.php/Dali_Developer_Documentation

Page 5: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

JPA Development Perspective• To start using

Dali JPA Tools

in Eclipse open

“JPA Development”

perspective

Page 6: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Basic Steps• Create a database connection• Create a JPA project• Create persistent Java entities• Associate the entity with a database table• Create OR mapping

• id• columns• relationships

Page 7: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Database Connection• Create database

connection using a

“Data Source Explorer”

view

Page 8: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

JPA Details View• The JPA Details view displays the

persistence information for the currently selected entity

Page 9: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

JPA Structure View• The JPA Structure view displays an

outline of the structure (its attributes and mappings) of the entity that is currently selected or opened in the editor

Page 10: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Managing the persistence.xml file• When creating a JPA project, you can also

create the persistence.xml file• Use the Persistence XML Editor to edit the

persistence.xml file• Synchronizing classes

• as you work with the classes in your Java project, you will need to update the persistence.xml file to reflect the changes

• right-click the persistence.xml file JPA Tools Synchronize Classes

Page 11: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Generating Entities from Tables• Procedure to generate Java persistent

entities from database tables• Right-click the JPA project JPA Tools

Generate Entities• Eclipse creates a Java persistent entity

for each database table• Each entity contains fields based on the

table’s columns• Eclipse will also generate entity

relationships based on the table constrain

Page 12: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Table Generation from Entities• Generates platform specific tables from

Entities through the DDL generation

• Right-click the JPA project JPA Tools Generate DDL

Page 13: Dali JPA Tools. About Dali Dali JPA Tools is an Eclipse Web Tools Platform sub-Project Dali 1.0 is a part of WTP 2.0 Europa coordinated release Goal -

Demos• On the project web site it’s possible to

view visual Demos for:• Creating a Database Connection• Creating a Database Schema• Creating a JPA Project• Mapping with Annotations• Mapping with XML