Enhanced User Class Attribute Creation from Database Tables
Generating attributes from table or view columns is now improved. The new process maps all supported data types. For those data types that have no direct OpenROAD correspondence, such as long byte, attributes with equivalent data types (such as LongByteObject) are created, where possible.
Details about the database elements are captured, including names, database table and owner, columns and column sequence, keys, and constraints. You can adjust created attribute names systematically, by removing prefixes and replacing underscores with capital letters. You can also create object attributes, derived from relationships to other tables.
The Workbench User Class Editor implements two dialogs with expanded features: Select a Database Table and Confirm to Continue.
The Database field and Table or View field now have a white background to indicate they are editable.
The dialog includes the following new fields:
Trim prefix from names
Prefix to trim
Trims a standard prefix from imported attribute names (which are based on column names). Enter the prefix text to trim.
Capitalize (no underscores)
Removes any underscores and capitalizes the first letter and the letter that follows each underscore. For example, no_underscores becomes NoUnderscores.
Cascade attribute creation
Automatically creates attributes for all the user classes that may be created during the attribute import process.
By default, attributes are created not only for the table's columns, but also the table's relationships to other tables. Relationship attributes have attributes whose data type is a user class (or array of user class), because the related table typically corresponds to a business class. OpenROAD looks for a user class whose name matches the related table; if it finds one, it will use that as the attribute's data type. If it does not find one, it offers to create it so that the attribute can be assigned the correct data type.
Create simple attributes only
Specifies that user class (relationship) attributes should not be created (only attributes that correspond directly to the specified table's columns are created).
Write referential joins to file
Creates a file that lists referential joins identified during the processing for later analysis.
Use supplied joins
Reload from file
Replaces the generator's join-identification analysis step with a prepared list of joins.
To use a file to which referential joins were previously output, select Reload from file. A default file name is supplied, which you may overwrite. Click Browse to select a new location for the file.
When you click OK on the Select a Database Table dialog, if an attribute is to be given the data type of a user class that does not yet exist, a popup confirmation dialog appears, asking you to confirm that you want to do this.
The options do the following:
Yes
The user class (with no attributes and methods) and attribute are created. If another attribute is to be created, the confirmation dialog remains for your next choice.
Yes to All
The user class and attribute are created, and you are not asked again to confirm creation for similar cases.
Note: If multiple user classes and attributes are being created and you selected Cascade attribute creation, "runaway" cascades will not happen. Clicking Yes to All enables cascading for only one set of user class and attributes at a time. At the next cascade level, the confirmation is displayed again.
No
The displayed attribute is not created, but creation of any others continues, and the confirmation dialog is displayed again.
No to All
The user class and attribute are not created, and creation of any others is also automatically rejected, and the confirmation dialog is not displayed again.
Cancel
The attribute creation process is canceled altogether, and the confirmation dialog closes. No attributes are created.
OpenROAD displays the created column names and data types in the Attributes tab of the Class Editor. Any created user classes appear in the Workbench component list.
For more information, see Create Attributes from a Table in the Workbench User Guide.
The Class Editor's Attributes from Database Table facility now creates a number of tagged value entries, most defining information determined from the database, in some cases provisionally. You may edit the values of these entries where appropriate. For more information, see Properties for User Class Attributes in the Workbench User Guide and AllAttributes Method (RequestManager) in the Language Reference Guide.