OracleObjectMappingAttribute Class

The OracleObjectMappingAttribute class marks custom class fields or properties with information that ODP.NET uses when a custom type represents an Oracle Object type.

Class Inheritance

System.Object

  System.Attribute

    System.OracleObjectMappingAttribute

Declaration

// C#
[AttributeUsageAttribute(AttributeTargets.Field|AttributeTargets.Property, AllowMultiple=false, Inherited=true)]

public sealed class OracleObjectMappingAttribute : Attribute

Remarks

The OracleObjectMappingAttribute is specified on members of a custom type that represent an Oracle object type. This attribute must specify the name or zero-based index of the attribute in the Oracle object that the custom class field or property maps to. This also allows the custom type to declare field or property names which differ from the Oracle Object type.

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

ODP.NET Version: ODP.NET for .NET Framework 2.0 or ODP.NET for .NET Framework 4


OracleObjectMappingAttribute Members

OracleObjectMappingAttribute members are listed in the following tables.

OracleObjectMappingAttribute Constructors

OracleObjectMappingAttribute constructors are listed in Table 16-8.

Table 16-8 OracleObjectMappingAttribute Constructors

Constructor Description

OracleObjectMappingAttribute Constructors

Instantiates a new instance of OracleObjectMappingAttribute class (Overloaded)


OracleObjectMappingAttribute Static Methods

OracleObjectMappingAttribute static methods are listed in Table 16-9.

Table 16-9 OracleObjectMappingAttribute Static Methods

Method Description

Equals

Inherited from System.Attribute

GetCustomAttribute

Inherited from System.Attribute

GetCustomAttributes

Inherited from System.Attribute

IsDefined

Inherited from System.Attribute

ReferenceEquals

Inherited from System.Attribute


OracleObjectMappingAttribute Properties

OracleObjectMappingAttribute properties are listed in Table 16-10.

Table 16-10 OracleObjectMappingAttribute Properties

Property Description

AttributeIndex

Specifies the index of the Oracle Object attribute that must be retrieved

AttributeName

Specifies the name of Oracle Object attribute that must be retrieved

TypeId

Inherited from System.Attribute


OracleObjectMappingAttribute Methods

OracleObjectMappingAttribute methods are listed in Table 16-11.

Table 16-11 OracleObjectMappingAttribute Methods

Method Description

Equals

Inherited from System.Attribute

GetHashCode

Inherited from System.Attribute

GetType

Inherited from System.Attribute

IsDefaultAttribute

Inherited from System.Attribute

Match

Inherited from System.Attribute

ToString

Inherited from System.Attribute



OracleObjectMappingAttribute Constructors

OracleObjectMappingAttribute constructors create new instances of the OracleObjectMappingAttribute class.

Overload List:

OracleObjectMappingAttribute(string)

This constructor creates and initializes an OracleObjectMappingAttribute object with the specified Oracle Object attribute name.

Declaration

// C#
public OracleObjectMappingAttribute(string attrName);

Parameters

  • attrName

    The name of the Oracle Object attribute to map to.

Remarks

The attrName parameter is case-sensitive.

OracleObjectMappingAttribute(int)

This constructor creates and initializes an OracleObjectMappingAttribute object with the specified Oracle Object attribute index.

Declaration

// C#
public OracleObjectMappingAttribute(int attrIndex);

Parameters

  • attrIndex

    The zero-based index of the Oracle Object attribute to map to.


OracleObjectMappingAttribute Static Methods

OracleObjectMappingAttribute static methods are listed in Table 16-12.

Table 16-12 OracleObjectMappingAttribute Static Method

Method Description

Equals

Inherited from System.Attribute

GetCustomAttribute

Inherited from System.Attribute

GetCustomAttributes

Inherited from System.Attribute

IsDefined

Inherited from System.Attribute

ReferenceEquals

Inherited from System.Attribute



OracleObjectMappingAttribute Properties

OracleObjectMappingAttribute properties are listed in Table 16-13.

Table 16-13 OracleObjectMappingAttribute Properties

Property Description

AttributeIndex

Specifies the index of the Oracle Object attribute that must be retrieved

AttributeName

Specifies the name of the Oracle Object attribute that must be retrieved

TypeId

Inherited from System.Attribute


AttributeIndex

This property specifies the index of the Oracle Object attribute that must be retrieved.

Declaration

// C#
public int AttributeIndex {get;}

Property Value

The zero-based index of an Oracle Object type attribute.

Remarks

The AttributeIndex property specifies the index of the Oracle Object type attribute that the custom class field or property maps to. This allows the custom class to declare fields or property names that differ from the Oracle object.

AttributeName

This property specifies the name of the Oracle Object attribute that must be retrieved.

Declaration

// C#
public string AttributeName {get;}

Property Value

The name of an attribute of an Oracle Object type.

Remarks

The AttributeName property specifies name of the attribute in the Oracle Object type that the custom class field or property maps to. This allows the custom class to declare field or property names that differ from the Oracle object.

The specified attribute name is case-sensitive.


OracleObjectMappingAttribute Methods

OracleObjectMappingAttribute methods are listed in Table 16-14.

Table 16-14 OracleObjectMappingAttribute Methods

Method Description

Equals

Inherited from System.Attribute

GetHashCode

Inherited from System.Attribute

GetType

Inherited from System.Attribute

IsDefaultAttribute

Inherited from System.Attribute

Match

Inherited from System.Attribute

ToString

Inherited from System.Attribute