OracleCustomTypeMappingAttributeクラスは、カスタム・タイプがOracle UDTを表すために使用されるとき、カスタム・タイプ・ファクトリ・クラスまたはODP.NETで使用される情報の構造体をマークするために使用されます。
クラスの継承
System.Object
System.Attribute
System.OracleCustomTypeMappingAttribute
宣言
// C# [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple=false, Inherited=true)] public sealed class OracleCustomTypeMappingAttribute : Attribute
要件
| プロバイダ | ODP.NET管理対象外ドライバ |
| アセンブリ | Oracle.DataAccess.dll |
| ネームスペース | Oracle.DataAccess.Types |
| .NET Framework | 3.5, 4.0, 4.5 |
備考
OracleCustomTypeMapping属性をカスタム・タイプ・ファクトリ・クラスで指定して、対応するカスタム・タイプを表すOracle UDTを示す必要があります。Oracle UDTはschema_name.type_nameの書式で指定できます。
アプリケーションが使用する各Oracle UDTに対して、カスタム・タイプ・ファクトリは一意である必要があります。
Oracleオブジェクト型
カスタム・タイプ・ファクトリは、その他のOracleオブジェクト型を表すのに使用できないカスタム・タイプを戻します。
Oracleコレクション型
カスタム・タイプ・ファクトリは、その他のOracleコレクション型が使用できるカスタム・タイプを戻す場合があります。配列タイプがOracleコレクションを表すために使用されるとき、つまりint[]がNUMBERのコレクションを表すときに共通なことです。
OracleCustomTypeMappingAttributeが指定されていない場合、カスタム・タイプ・マッピングはXML構成ファイル(Windowsアプリケーションにはapp.config、Webアプリケーションにはweb.configおよびmachine.configなど)から指定する必要があります
スレッド安全性
パブリック静的メソッドはスレッドセーフですが、インスタンス・メソッドではスレッド安全性は保証されません。
OracleCustomTypeMappingAttributeメンバーは次の表にリスト表示されています。
OracleCustomTypeMappingAttributeコンストラクタ
OracleCustomTypeMappingAttributeコンストラクタを、表16-1に表示します。
表16-1 OracleCustomTypeMappingAttributeコンストラクタ
| コンストラクタ | 説明 |
|---|---|
|
OracleCustomTypeMappingAttributeコンストラクタ |
|
OracleCustomTypeMappingAttribute静的メソッド
OracleCustomTypeMappingAttribute静的メソッドを、表16-2にリストします。
表16-2 OracleCustomTypeMappingAttribute静的メソッド
| メソッド | 説明 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OracleCustomTypeMappingAttributeプロパティ
OracleCustomTypeMappingAttributeプロパティを、表16-3にリストします。
表16-3 OracleCustomTypeMappingAttributeプロパティ
| プロパティ | 説明 |
|---|---|
|
カスタム・クラスをマップするOracleユーザー定義のタイプ名を指定します |
|
|
|
|
OracleCustomTypeMappingAttributeメソッド
OracleCustomTypeMappingAttributeメソッドを、表16-4にリストします。
OracleCustomTypeMappingAttributeコンストラクタでは、OracleCustomTypeMappingAttributeクラスの新規インスタンスを作成します。
オーバーロード・リスト:
OracleCustomTypeMappingAttribute(string)
このコンストラクタでは、指定されたOracleユーザー定義のタイプ名を使用してOracleCustomTypeMappingAttributeを作成および初期化します。
このコンストラクタでは、指定されたOracleユーザー定義のタイプ名を使用してOracleCustomTypeMappingAttributeを作成および初期化します。
宣言
// C#
public OracleCustomTypeMappingAttribute(string udtTypeName)
パラメータ
udtTypeName
カスタム・クラスをマップするOracleユーザー定義のタイプ名。
備考
udtTypeNameパラメータは大/小文字を区別します。udtTypeNameはschema_name.type_nameの形式で指定されます。
OracleCustomTypeMappingAttribute静的メソッドを、表16-5にリストします。
OracleCustomTypeMappingAttributeプロパティを、表16-6にリストします。
表16-6 OracleCustomTypeMappingAttributeプロパティ
| プロパティ | 説明 |
|---|---|
|
カスタム・クラスをマップするOracleユーザー定義のタイプ名を指定します |
|
|
|
|
OracleCustomTypeMappingAttributeメソッドを、表16-7にリストします。