Oracle Custom Class Wizard
Using the Oracle Custom Class Wizard, you can generate .NET custom classes for both object types and collection types. These classes can be used to build ODP.NET applications that work with UDTs in Oracle Database.
The Oracle Custom Class Wizard enables you to generate .NET custom classes in one of the following languages: C#, VB.NET, and Managed C.
The wizard allows you to configure some properties of the custom class.
This section covers the following topics:
Starting the Oracle Custom Class Wizard
To start the Oracle Custom Class Wizard, do the following:
Select the Generate Custom Class item from the menu of an object type or collection type node.
Oracle Custom Class Wizard does not start unless a project is open. If there is a solution without a project, it cannot start.
The opening screen of the Oracle Custom Class Wizard appears as follows:
Using the Oracle Custom Class Wizard
The Oracle Custom Class Wizard gives you the ability to control certain details about the custom class.
Languages in the Oracle Custom Class Wizard
The wizard detects which language the project is in and generates code in that language.
If there is more than one open project from different languages in the solution, then the project that the wizard generates is determined using the following order:
-
The first C# project found.
-
The first Visual Basic project found.
-
The first managed C project found.
See Also
Generating Classes with the Oracle Custom Class Wizard
The Oracle Custom Class Wizard has two primary screens that enable you to customize the generation of code.
The first window enables you to choose types and configure code generation details as follows.
The second window enables you to customize the attributes for the types you have chosen in the first window.
This wizard automatically generates default names for the following based on the related information from the selected user-defined type:
-
File name
-
Project
-
Namespace
-
Class name
-
Super class Name
-
Property Name
All of the auto-generated names will be in mixed case.
The Oracle Custom Class Wizard provides the following windows to generate custom classes corresponding to UDTs of both collection type and object type:
Window | Description |
---|---|
Welcome to the Oracle Custom Class Wizard |
Welcome page for the wizard. To bypass this page the next time you run the wizard, select the Do not show this page again check box. See "Starting the Oracle Custom Class Wizard". |
Choose Types and Configure Code Generation Details |
A tree view appears on the left side of the wizard as follows:
Select the desired user-defined type. See "Using the Oracle Custom Class Wizard" Next is disabled if no UDTs are selected. Specify the following information:
|
Customize Attributes |
In this window the type (object type or collection type), such as The right window displays properties of that type in a read-only mode. These properties are still available by clicking Back. The properties include Filename, Project, Namespace, Class Name, and Superclass Name. Click Next to view the second part of this window. Next is disabled if no UDTs and attributes are selected. The same tree view appears, but the right side contains the properties of the attributes (for object types) and elements (for collection types). When you highlight an attribute or element in the tree view, its properties appear on the right side as follows:
If either the Class Name or Property Name field is empty, then the wizard displays an error message. |
Summary |
Displays a summary of the different tasks to be performed to generate the .NET custom class, if the required information is provided. The Summary indicates the project that the class will be added to and the file that will contain the class definition. This window indicates that the class will not be generated if a UDT Type was de-selected, either in the Configure Class details screen or in the Customize Attributes screen. Click Finish to complete the wizard tasks or Back to change or add information. During code generation, for each of the files being generated, if a file with a name you provided already exists, you are prompted to overwrite that file as follows:
For the selected project, the wizard adds reference to When the process completes, the wizard closes and all newly created files are opened for editing. The output window also lists the success or failure of code generation. |