Oracle® Data Provider for .NET Developer's Guide 11g Release 2 (11.2) Part Number E12249-01 |
|
|
View PDF |
IOracleCustomType
is an interface for converting between a Custom Type and an Oracle Object or Collection Type.
Declaration
// C# public interface IOracleCustomType
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: 2.0 or later
See Also:
IOracleCustomType
members are listed in the following tables.
IOracleCustomType Interface Methods
IOracleCustomType
interface methods are listed in Table 16-22.
Table 16-22 IOracleCustomType Interface Methods
Interface Method | Description |
---|---|
Returns the values that set the Oracle Object attributes |
|
Provides the Oracle Object with the attribute values to set on the custom type |
IOracleCustomType
Interface methods are listed in Table 16-23.
Table 16-23 IOracleCustomType Interface Methods
Interface Method | Description |
---|---|
Returns the values that set the Oracle Object attributes |
|
Provides the Oracle Object with the attribute values to set on the custom type |
This interface method creates an Oracle Object or Collection by setting the attribute or element values respectively on the specified Oracle UDT.
Declaration
// C# void FromCustomObject(OracleConnection con, IntPtr pUdt);
Parameters
con
An OracleConnection
instance.
pUdt
An opaque pointer to the Oracle Object or Collection to be created.
Remarks
The FromCustomObject
method is used to build an Oracle Object or Collection from a custom object by setting attribute or element values respectively through the OracleUdt.SetValue
method.
The OracleUdt.SetValue
method is invoked as follows:
Oracle Object Type
For a custom type that represents an Oracle Object Type, the OracleUdt.SetValue
method must be invoked for each non-NULL
attribute value that needs to be set.
Oracle Collection Type
For a custom type that represents an Oracle Collection Type, a single call to OracleUdt.SetValue
method specifies the collection element values.
This interface initializes a custom object using the specified Oracle UDT.
Declaration
// C# void ToCustomObject (OracleConnection con, IntPtr pUdt);
Parameters
con
An OracleConnection
instance.
pUdt
An opaque pointer to the Oracle UDT.
Remarks
The ToCustomObject
method is used to initialize a custom object from the specified Oracle Object or Collection by retrieving attribute or element values respectively through the OracleUdt.GetValue
method.
The OracleUdt.GetValue
method is invoked as follows:
Oracle Object Type
For a custom type that represents an Oracle Object Type, the OracleUdt.GetValue
method must be invoked for each attribute value to be retrieved.
For a custom type that represents an Oracle Collection Type, a single call to OracleUdt.GetValue
method retrieves the collection element values.