| Oracle® Data Provider for .NET Developer's Guide 11g Release 1 (11.1.0.6.20) Part Number E10927-01  | 
  | 
  | 
View PDF | 
The OracleCustomTypeMappingAttribute class is used to mark a custom type factory class or struct with information that is used by ODP.NET when a custom type is used to represent an Oracle UDT.
Class Inheritance
System.Object
System.Attribute
System.OracleCustomTypeMappingAttribute
Declaration
// C# [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple=false, Inherited=true)] public sealed class OracleCustomTypeMappingAttribute : Attribute
Remarks
The OracleCustomTypeMapping attribute must be specified on the custom type factory class to indicate the Oracle UDT that the corresponding custom type represents. The Oracle UDT may be specified in the form schema_name.type_name.
For each Oracle UDT that the application uses, there must be a unique custom type factory, as follows:
Oracle Object Types
The custom type factory must return a custom type that cannot be used to represent any other Oracle Object Type.
Oracle Collection Types
The custom type factory may return a custom type that can be used by other Oracle Collection Types. This is common when an array type is used to represent an Oracle Collection, that is, when an int[] is used to represent a collection of NUMBERs.
If the OracleCustomTypeMappingAttribute is not specified, then custom type mappings must be specified through an XML configuration file, for example, app.config for Windows applications or the web.config for web applications, and the machine.config
Thread Safety
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
Requirements
Namespace: Oracle.DataAccess.Types
Assembly: Oracle.DataAccess.dll
Microsoft .NET Framework Version: 1.0 or later
See Also:
OracleCustomTypeMappingAttribute members are listed in the following tables.
OracleCustomTypeMappingAttribute Constructors
OracleCustomTypeMappingAttribute constructors are listed in Table 14-1.
Table 14-1 OracleCustomTypeMappingAttribute Constructors
| Constructor | Description | 
|---|---|
| 
 OracleCustomTypeMappingAttribute Constructors  | 
 Instantiates a new instance of   | 
OracleCustomTypeMappingAttribute Static Methods
OracleCustomTypeMappingAttribute static methods are listed in Table 14-2.
Table 14-2 OracleCustomTypeMappingAttribute Static Methods
| Method | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
OracleCustomTypeMappingAttribute Properties
OracleCustomTypeMappingAttribute properties are listed in Table 14-3.
Table 14-3 OracleCustomTypeMappingAttribute Properties
| Property | Description | 
|---|---|
| 
 Specifies the Oracle user-defined type name that the custom class maps to  | 
|
| 
 
  | 
 Inherited from   | 
OracleCustomTypeMappingAttribute Methods
OracleCustomTypeMappingAttribute methods are listed in Table 14-4.
Table 14-4 OracleCustomTypeMappingAttribute Methods
| Method | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
OracleCustomTypeMappingAttribute constructors create new instances of the OracleCustomTypeMappingAttribute class.
Overload List:
OracleCustomTypeMappingAttribute(string)
This constructor creates and initializes an OracleCustomTypeMappingAttribute using the specified Oracle user-defined type name.
See Also:
This constructor creates and initializes an OracleCustomTypeMappingAttribute using the specified Oracle user-defined type name.
Declaration
// C#
public OracleCustomTypeMappingAttribute(string udtTypeName)
Parameters
udtTypeName
The Oracle user-defined type name that the custom class maps to.
Remarks
The udtTypeName parameter is case-sensitive. The udtTypeName is specified in the form of schema_name.type_name.
See Also:
OracleCustomTypeMappingAttribute static methods are listed in Table 14-5.
Table 14-5 OracleCustomTypeMappingAttribute Static Methods
| Method | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
See Also:
OracleCustomTypeMappingAttribute properties are listed in Table 14-6.
Table 14-6 OracleCustomTypeMappingAttribute Properties
| Property | Description | 
|---|---|
| 
 Specifies the Oracle user-defined type name that the custom class maps to  | 
|
| 
 
  | 
 Inherited from   | 
See Also:
This property specifies the Oracle user-defined type name that the custom class maps to.
Declaration
// C#
public string UdtTypeName {get; set;}
Property Value
A string that represents an Oracle user-defined type name.
Remarks
UdtTypeName is case-sensitive. It is specified in the form of schema_name.type_name.
See Also:
OracleCustomTypeMappingAttribute methods are listed in Table 14-7.
Table 14-7 OracleCustomTypeMappingAttribute Methods
| Method | Description | 
|---|---|
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   | 
| 
 
  | 
 Inherited from   |