GetEntityDefNames

説明

現在のデータベースのスキーマ 内のレコード タイプの名前を含む配列を戻します。

このメソッドは、すべての状態ありおよび状態なしレコード タイプの名前を戻します。

このメソッドを使用して名前のリストを取得すると、GetEntityDef メソッドを呼び出して、指定したレコード タイプの EntityDef オブジェクトを取得できます。

構文

VBScript

session.GetEntityDefNames 

Perl

$session->GetEntityDefNames(); 
識別子
説明
session
現在のデータベース アクセス セッションを表す Session オブジェクト。
戻り値
Visual Basic の場合、文字列の配列を含む Variant が戻されます。配列内の各文字列には、スキーマ内の単一 EntityDef の名前が含まれます。Perl の場合は、文字列の配列への参照が戻されます。

VBScript

set sessionObj = GetSession

' Get the list of names of all record types. 
entityDefNames = sessionObj.GetEntityDefNames 

' Iterate over all the record types 
for each name in entityDefNames 
      set entityDefObj = sessionObj.GetEntityDef(name)

   ' Do something with the EntityDef object 
   Next

Perl

#Create a Rational ClearQuest session

$sessionObj = $entity->GetSession();



#Get the names of the record types in the
# current database's schema. 

$entityDefNames = $sessionObj->GetEntityDefNames(); 


   #Iterate over the record types
   foreach $name ( @$entityDefNames ) 
      {
      $entityDefObj = $sessionObj->GetEntityDef( $name );

      #Do something with the EntityDef object

      } 

フィードバック