IOracleCustomType Interface

IOracleCustomType is an interface for converting between a Custom Type and an Oracle Object or Collection Type.

Declaration

// C#
public interface IOracleCustomType

Requirements

Provider ODP.NET, Unmanaged Driver
Assembly Oracle.DataAccess.dll
Namespace Oracle.DataAccess.Types
.NET Framework 3.5, 4.0, 4.5

Thread Safety

All public static methods are thread-safe, although instance methods do not guarantee thread safety.

IOracleCustomType Members

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

FromCustomObject

Returns the values that set the Oracle Object attributes

ToCustomObject

Provides the Oracle Object with the attribute values to set on the custom type


IOracleCustomType Interface Methods

IOracleCustomType Interface methods are listed in Table 16-23.

Table 16-23 IOracleCustomType Interface Methods

Interface Method Description

FromCustomObject

Returns the values that set the Oracle Object attributes

ToCustomObject

Provides the Oracle Object with the attribute values to set on the custom type


FromCustomObject

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.

ToCustomObject

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.