UML-to-EJB transformation

The UML-to-EJB transformation generates Enterprise JavaBeans™ (EJB) and Java™ code from Unified Modeling Language (UML) model elements.

What you can convert to enterprise beans and Java

UML object What is transformed
Model All packages, classes, and interfaces that the model contains
Package The package and all classes and interfaces that the package contains
Class The class and all attributes, operations, classes, and interfaces that the class contains
Interface The interface and all attributes, operations, classes, and interfaces that the interface contains
Enumeration The enumeration and all enumeration literals
Note: The parent of a class, interface, and enumeration must be a UML package.

Where the transformation generates output

The transformation can generate output to a single EJB project. You can create the EJB project with or without a client project. The transformation generates code in the first detected source folder of the EJB project and in the first detected source folder of the client project, if one exists.

Alternate names for the generated output

You can create a mapping model to specify alternate names for the elements that the transformation generates, without modifying the source model. You might want to specify alternate names if you want to include Java-specific details, such as naming restrictions in platform-independent models, or if the logical organization of the source model is not appropriate as target packaging.

You can specify a qualified name such as com.ibm.NewName.com or an unqualified name such as NewName. Specifying alternate names for packages affects all classifiers in that package, unless the classifier specifies a fully qualified name. You can also specify alternate locations in the same project for elements that the transformation generates.

Source-to-target relationships

If you select the Generate Source to Target Relationships option, the UML-to-EJB transformation creates derived relationships from generated Java elements to their corresponding UML source model elements. The transformation adds tags to the Javadoc HTML documentation of the generated Java classes and interfaces, which contain information that enables tools to trace the generated files to the UML source element. For generated enterprise beans, all the Java files that the transformation generates have source-to-target tags that point to the single UML source class. After the transformation generates source-to-target relationships for enterprise beans, you can only remove them manually. You must edit the individual Java files for each enterprise bean and delete the source-to-target relationship tag from the file’s Javadoc HTML documentation.

Related tasks
Generating EJB beans and Java classes from UML models
Applying the UML-to-EJB transformation profile
Related reference
Installed transformations
Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.