3 Development Tools for TopLink

This chapter describes the support for TopLink provided by Oracle JDeveloper, Oracle Enterprise Pack for Eclipse, and the Eclipse and NetBeans development environments.

This chapter contains the following sections:

3.1 Oracle JDeveloper

Oracle JDeveloper is a Java EE development environment with end-to-end support to develop, debug, and deploy e-business applications and web services.

For JDeveloper information and downloads, see:

http://www.oracle.com/us/products/tools/019657.htm

JDeveloper includes a number of features to aid in the development of applications that use TopLink. These features include wizards to reverse engineer JPA entities from database tables and to generate EJB 3.0 Session Beans with EntityManager injection. It also includes methods for querying JPA entities and to test client generation.

Oracle JDeveloper's TopLink Editor enables you to quickly and easily configure and map your Java classes, EJB, and JPA entities to different data sources, including relational databases and XML schemas without using code. The TopLink editor supports multiple standards, including JPA and EJB 3.0.

The DBWSBuilder design-time utility enables you to generate a TopLink DBWS service descriptor and accompanying files. The utility automatically generates these files from database metadata to derive element-tag names and types. The utility also assembles the files into deployable archives.

For more information on Oracle JDeveloper's TopLink editor and DBWSBuilder, see JDeveloper online help.

3.2 Oracle Enterprise Pack for Eclipse

Oracle Enterprise Pack for Eclipse (OEPE) is a set of plug-ins designed to support Java EE development, where Eclipse is your preferred IDE.

For OEPE information and downloads, see:

http://www.oracle.com/technetwork/developer-tools/eclipse/overview/index.html

OEPE helps you complete the following tasks to create a persistence layer that uses TopLink JPA:

  • Configure the Persistence Provider for JPA Projects.

    OEPE provides an EclipseLink project facet that you can use in your Eclipse JPA project. Selecting the EclipseLink project facet makes the following changes to your project:

    • The project build path is automatically configured to include EclipseLink persistence provider JAR files shipped with Oracle WebLogic Server 11g Release 1. Note that, even though the library files are not shipped with earlier versions of Oracle WebLogic Server, you can download them using the facet configuration wizard.

    • The database connection properties specific to EclipseLink can be automatically configured in the persistence.xml file of your Eclipse JPA project.

  • Generate JPA Entities.

    OEPE enables you to generate JPA entities using the OEPE JPA Entity Generation Wizard.

  • Annotate Java Classes.

    Using OEPE, you can annotate existing Java classes (POJOs) with JPA annotations based on a database schema. When you do, Eclipse adds JPA annotations to the appropriate accessors.

  • Use a JPA Entity Diagram Editor.

    OEPE provides graphical user interfaces for viewing entity relationship within a JPA project. Using the Entity Diagram Editor, you can view and modify relationships between entities, get easy access to the entity source code, and create additional object-relational mappings. Note that the editor lets you edit properties of both entities and their fields. You can also edit the persistence.xml file that describes the persistence context.

  • Use SQL Schema Viewer.

    OEPE enables you to examine your database schema using the SQL Schema Viewer that displays tables and relationships between them. The viewer displays tables as table nodes. Each node lists all the columns in a table and shows column data types. The node also provides primary and foreign key indicators in the form of icons. Foreign key relationships between tables are represented by links in a form of arrows.

3.3 Eclipse

The Eclipse IDE provides a number of features and utilities to help you create, run, and maintain applications that use JPA. These capabilities are extended if you install OEPE.

For Eclipse IDE information and downloads, see:

http://www.oracle.com/technetwork/developer-tools/eclipse/overview/index.html

The Dali Java Persistence Tools Project provides extensible frameworks and tools for defining and editing object-relational mappings for JPA entities. JPA mapping support focuses on minimizing the complexity of mapping by providing entity generation wizards, design-time validation, and a robust UI for entity and persistence unit configuration.

For Dali information and downloads, see:

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

Other tools and utilities from the Oracle, open source, and third party vendor communities are available from the Eclipse Marketplace.

http://marketplace.eclipse.org/

3.4 NetBeans

NetBeans IDE bundles Oracle GlassFish Server 3.1.1, which includes Oracle TopLink. The IDE provides full support for JPA-based code development. This support includes entity class wizards for constructing entities and editor hints to ensure that entities conform to the JPA specification. NetBeans also provides a persistence unit editor for constructing a persistence.xml file.

For NetBeans information and downloads, see:

http://netbeans.org/index.html