Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g (10.1.3.1.0) Part Number B25947-01 |
|
|
View PDF |
Since your layer of business domain objects represents a key reusable asset to your team, it is often convenient to visualize it using a UML model. JDeveloper supports easily creating a diagram for your business domain layer that you and your colleagues can use for reference.
To create a diagram of your entity objects, use the Create Business Components Diagram dialog. You access it from the New Gallery in the Business Tier > ADF Business Components category. The dialog prompts you for a diagram name, and a package name in which the diagram will be created. Enter a diagram name like "Business Domain Objects
" and a name for the package like devguide.model.design
, and click OK to create the empty diagram.
To add your existing entity objects to the diagram, select them all in the Application Navigator and drop them onto the diagram surface. Use the property inspector to hide the package name, change the font, turn off the grid and page breaks, and display the name of the two associations that might have been otherwise ambiguous. The diagram should now look like what you see in: Figure 6-10:
When you create a business components diagram, JDeveloper creates an XML file representing the diagram in a subdirectory of the project's model path that matches the package name in which the diagram resides. For the Business Domain Objects
diagram in Figure 6-10, it would create a matching *.oxd_bc4j
file in the ./devguide/model/design
subdirectory of the model path. By default, the Application Navigator unifies the display of the project contents paths so that ADF components and Java files in the source path appear in the same package tree as the UML model artefacts in the project model path. However, as shown in Figure 6-11, using the Toggle Directories toolbar button on the navigator, you can see the distinct project content path root directories when you prefer.
The UML diagram of business components is not just a static picture that reflects the point in time when you dropped the entity objects onto the diagram. Rather, it is a UML-based rendering of the current component definitions, so it will always reflect the current state of affairs. What's more, the UML diagram is both a visualization aid and a visual navigation and editing tool. You can bring up the Entity Object Editor for any entity object in a diagram by selecting Properties... from the context menu (or double-clicking). You can also perform some entity object editing tasks directly on the diagram like renaming entities and entity attributes, as well as adding or removing attributes.
When you include a business component like an entity object a UML diagram, JDeveloper adds extra metadata to a Data section of the component's XML component descriptor as shown in Example 6-1. This is additional information is used at design time only.
Example 6-1 Additional UML Metadata Added to an Entity Object XML Descriptor
<Entity Name="ServiceRequest" ... > <Data> <Property Name ="COMPLETE_LIBRARY" Value ="FALSE" /> <Property Name ="ID" Value ="ff16fca0-0109-1000-80f2-8d9081ce706f::::EntityObject" /> <Property Name ="IS_ABSTRACT" Value ="FALSE" /> <Property Name ="IS_ACTIVE" Value ="FALSE" /> <Property Name ="IS_LEAF" Value ="FALSE" /> <Property Name ="IS_ROOT" Value ="FALSE" /> <Property Name ="VISIBILITY" Value ="PUBLIC" /> </Data> : </Entity>