Format DEFINE GENERIC type-name element-name [ DESCRIPTION IS /*text*/ ] [ AUDIT IS /*text*/ ] [ {n } ] [ property-name IS {quoted-string } ] ... . [ { } ] [RELATIONSHIPS. ] [ {RELATIONSHIP relationship-name } ] [ { } ] [ { relationship-mbr-options } ] [ { [ {n }] } ] [ { [property-name IS {quoted-string}] ... . } ... ] [ { [ { }] } ] [ { } ] [ { END relationship-name RELATIONSHIP . } ] [ END RELATIONSHIPS . ] [ ] END [ GENERIC type-name element-name ] .
1 – Parameters
1.1 – type-name
Specifies the type of the generic element you are defining.
1.2 – element-name
Specifies the generic element you are defining.
1.3 – text
Adds information. Within the DESCRIPTION clause, this is information documenting the generic element; within the AUDIT clause, it is a history list entry. Valid delimiters are /* */ or double quotation marks (" "). You can use Japanese to document comments in the DESCRIPTION or AUDIT clause for a field. To do this, use the SET CHARACTER_SET command, and set the character_set of the session to DEC_KANJI.
1.4 – property-name
Specifies a property.
1.5 – n
Sets the numeric value for a property.
1.6 – quoted-string
Sets the value (a string enclosed in quotation marks) for a property.
1.7 – relationship-name
Specifies the relationship that you are defining for the generic element. The type must be a subtype of RELATION.
1.8 – relationship-mbr-options
Allows you to specify a relationship member. This member can be an existing element in a repository, or it can be an element you create within the DEFINE GENERIC command. See DEFINE GENERIC_Relationship_Member_Options command for more information.
2 – Description
The DEFINE GENERIC command creates a generic element definition. You can create generic elements that are based on types supplied by Oracle CDD/Repository or on user-supplied (extended) types. If you do most of your work with extended types, it is recommended that you work through the Oracle CDD/Repository callable interface. The CDO GENERIC commands are useful to modify and display on a spot basis, but extensibility is not supported through CDO. If the generic element is a controlled versioned element, you use the DEFINE GENERIC command to create initial versions. Use the RESERVE and REPLACE commands to create new versions. If the generic element is an uncontrolled versioned element, use the DEFINE GENERIC command to create both initial and new versions. By default, CDO automatically assigns a directory name that is the same as the element name of the generic element that you define. However, you can assign a processing name to a generic element that is different from its directory name. When you define a property for a generic element, the property you specify must be a defined or inherited property for the element's type. Any values you specify for the property must be compatible with the data type indicated in the property type definition. Likewise, any relationship member you specify must be compatible with the relationship name's type. See the Oracle CDD/Repository Information Model Volume I for more information on valid properties and members. When you work with extended types, include the MCS_processingName property in your type definition. If you omit one of these properties, your type definition does not allow you to specify a processing name for generic elements based on it. Without a processing name, you cannot use the CHANGE GENERIC command to add or delete properties and relationships for a generic element. CAUTION Specify the MCS_processingName property, not the CDD$PROCESSING_NAME property, when you work with extended types. Otherwise, you experience performance degradation in the Oracle CDD/Repository callable interface.
3 – Examples
1.CDO> DEFINE GENERIC CDD$SOURCE_MODULE INPUT_MODULE_COB cont> MCS_PROCESSINGNAME "INPUT_MODULE_COB". cont> END CDD$SOURCE_MODULE INPUT_MODULE_COB. In this example, the DEFINE GENERIC command creates a generic element named INPUT_MODULE_COB based on the type CDD$SOURCE_MODULE supplied by Oracle CDD/Repository. 2.CDO> DEFINE GENERIC CDD$SOURCE_MODULE OUTPUT_MODULE_COB cont> MCS_PROCESSINGNAME "OUTPUT_MODULE_COB". cont> END CDD$SOURCE_MODULE OUTPUT_MODULE_COB. In this example, the DEFINE GENERIC command creates a generic element named OUTPUT_MODULE_COB based on the product-supplied CDD$SOURCE_MODULE element type. 3.CDO> DEFINE GENERIC BOOK CDO_REFERENCE_MANUAL cont> MCS_PROCESSINGNAME IS "CDO_REFERENCE_MANUAL" cont> LIBRARY_NUMBER IS "AA-KL45A-TE". cont> END BOOK CDO_REFERENCE_MANUAL. In this example, the DEFINE GENERIC command creates a generic element named CDO_REFERENCE_MANUAL based on the user-supplied type BOOK.