JPA-to-UML transformations

The JPA-to-UML transformation generates annotated Unified Modeling Language (UML) model elements from Java projects or artifacts that contain Java Persistence API (JPA) code.
To create JPA projects and artifacts, you must enable the following capabilities:
Before you use this transformation to generate UML model elements, you must install specific components and enable specific capabilities.
  1. You must install the following components:
    • Java, Java Persistence API (JPA), and EJB 3.0 graphical editing and transformations
    • Tools for WebSphere® Application Server, version 7.0
  2. You must enable the following capabilities:
    • Java Persistence API Transformation
    • EJB 3.0 Transformation Profile tool
  3. If you configure the transformation to use the reconciled modeling design contract management protocol (DCMP), and configure the UML-to-JPA, or reverse, transformation to create trace relationships between the JPA entities and UML elements, you must enable the following capabilities:
    • EJB 3.0 Modeling
    • JPA Modeling
    Note: The Modeling capability category contains the EJB 3.0 Modeling and JPA Modeling capabilities.

Valid transformation sources

You can specify the following items as the source of the JPA-to-UML transformation:
  • Java projects
  • Java source folders
  • Java packages
  • Java files

If you select any of these items in the Package Explorer view instead of using the Transformation Configuration editor, the source elements that you select override the source project or elements that are specified in the transformation configuration. The transformation configuration is not affected and the source that you specify on the Source and Target page of the transformation configuration editor or in the New Transformation Configuration wizard does not change.

Valid transformation targets

A valid transformation target is a UML model or folder in a UML project.

Deployment descriptors and persistence files

You can configure the transformation to generate UML elements and stereotypes by using the information in a deployment descriptor, which consists of the following persistence files that are located in the META-INF folder of the transformation source project:
  • orm.xml: Contains the JPA annotations that correspond to the UML elements in the transformation source
  • persistence.xml: Contains a <mapping-file> element that refers to orm.xml

If the deployment descriptor does not contain the information to generate the required UML elements or stereotypes, the transformation uses the JPA annotations in the Java code.

Comparing and merging transformation output with target UML models

The JPA-to-UML transformation uses the comparing and merging functionality to determine the differences between the target model and the temporary model that the transformation generates. When you run the transformation, the merge editor displays the differences between the two models. In the merge editor, you can select the changes that the transformation merges into the target model.

Filters in the merge editor

You can use the filters in the merge editor to show or hide the different types of deltas that occur when you run the Java-to-UML transformation. To simplify the view in the merge editor, click the Filters icon on the toolbar, and select the filters to apply.

For example, the transformation does not set upper and lower bounds when it transforms multiplicity elements such as attributes and parameters. In the temporary model, upper and lower bounds are set to null if no collection type is generated. If the upper and lower bounds are explicitly specified in the target UML model, even if these boundary values specify a default multiplicity of 0..1, a delta exists between the temporary model and the target model. For large models, these trivial deltas might be numerous, and make other deltas more difficult to see in the merge editor. To hide this type of delta, select the Filter out Trivial Lower and Upper Bound Changes filter.

Limitations of the transformation in reconciled modeling

The JPA-to-UML transformation does not transform information about data sources.

Integration with team support

The transformation provides integration functionality with IBM® Rational® Team Concert, CVS, Rational ClearCase®, and Rational ClearCase LT version control systems, which enables you to automatically check out files or add new files. You must enable team capabilities to work with configuration management systems.


Feedback