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.
System.Object
System.Attribute
System.OracleCustomTypeMappingAttribute
// C# [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple=false, Inherited=true)] public sealed class OracleCustomTypeMappingAttribute : Attribute
Provider | ODP.NET, Unmanaged Driver |
Assembly | Oracle.DataAccess.dll |
Namespace | Oracle.DataAccess.Types |
.NET Framework | 3.5, 4.0, 4.5 |
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 NUMBER
s.
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
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
See Also:
OracleCustomTypeMappingAttribute
members are listed in the following tables.
OracleCustomTypeMappingAttribute Constructors
OracleCustomTypeMappingAttribute
constructors are listed in Table 16-1.
Table 16-1 OracleCustomTypeMappingAttribute Constructors
Constructor | Description |
---|---|
Instantiates a new instance of |
OracleCustomTypeMappingAttribute Static Methods
OracleCustomTypeMappingAttribute
static methods are listed in Table 16-2.
Table 16-2 OracleCustomTypeMappingAttribute Static Methods
Method | Description |
---|---|
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
OracleCustomTypeMappingAttribute Properties
OracleCustomTypeMappingAttribute
properties are listed in Table 16-3.
Table 16-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 16-4.
Table 16-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.
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.
// C#
public OracleCustomTypeMappingAttribute(string udtTypeName)
udtTypeName
The Oracle user-defined type name that the custom class maps to.
The udtTypeName
parameter is case-sensitive. The udtTypeName
is specified in the form of schema_name.type_name
.
OracleCustomTypeMappingAttribute
static methods are listed in Table 16-5.
Table 16-5 OracleCustomTypeMappingAttribute Static Methods
Method | Description |
---|---|
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
OracleCustomTypeMappingAttribute
properties are listed in Table 16-6.
Table 16-6 OracleCustomTypeMappingAttribute Properties
Property | Description |
---|---|
Specifies the Oracle user-defined type name that the custom class maps to |
|
|
Inherited from |
See Also:
OracleCustomTypeMappingAttribute
methods are listed in Table 16-7.
Table 16-7 OracleCustomTypeMappingAttribute Methods
Method | Description |
---|---|
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |
|
Inherited from |