xxx2

Model New Classes
To add the relationship between an existing class and the extension class — inheritance in Java terminology — use the "“Generalize”" relationship in Rational Rose.
The Generalize relationship between classes shows that the sub-class inherits the characteristics and behavior defined in one or more other super-classes.
---
Figure 6-1: Generalization
Persistable Data
Classes that are “persistable” store information in the database.
Custom classes that are persistable are modeled in Windchill as tables in the database.
By default, the name of the database table is the same as the class name, but this can be changed.
The structure of a table representing a custom class is similar to the table of the class that was extended.
Modeled attributes of custom classes will be columns in the table, and the column type depends on the attribute type.
Persistable classes are identified in Windchill because they inherit from the wf.fc.Persistable class.
Fixing Mistakes in Rose
When a mistake is made in Rose you can fix the mistake by deleting an element and re-creating it.
There are two types of Rational Rose elements:
1. Diagrammed: exist in the model and are visible as a distinct notation on a model class diagram. For example: class generalizations
2. Non-diagrammed: are in the model, but are only visible in the model tree There are different methods to properly delete each of these 2 types.
Deleting Elements
• Deleting diagrammed elements
1. Delete: deletes an element from a class diagram, but the element remains in the model
2. Delete from Model: deletes an element from a class diagram and from the model.
• Deleting non-diagrammed elements
– Delete: deletes an element from the model, but functions the same as the Delete from Model method for diagrammed elements.
---
Note: Never delete Windchill data or classes from the model. Windchill elements incorrectly added to a custom model, or no longer needed in a custom model, can be deleted (deleted from the diagram, but they remain in the model).
Implement Customization
Changes to the model must be processed by Windchill. This is known as a “system generation”.
System generation parses the Rational Rose UML model and generates a Windchill-readable file mData file.
Based on the mData file, Windchill proceeds to do the following:
• Generate Java classes.
• Generate SQL code for any modeled elements that need to be persistent.
• Generate resource bundles for modeled elements — classes, packages, attributes, etc.
• “Inform” Windchill that there are new classesand relationships.
– This updates the Windchill class registry property files in WT_HOME/codebase(associationRegistry.properties, classRegistry.propertiesdescendentRegistry.properties and modelRegistry.properties ).
Select a modeled class and select Tools > Windchill > System Generation.
---
Figure 6-3: System Generation
Module Descriptor is a function reserved for R&D. Ignore it and do not select it.

你可能感兴趣的:(sql,UML)