GetStateDefNames

説明

EntityDef オブジェクトに定義された状態名を戻します。

EntityDef オブジェクトの他の部分と同様に、管理者が Rational® ClearQuest® Designer を使用して定義済み状態を設定します。 これらは、API から直接には設定できません。

構文

VBScript

entitydef.GetStateDefNames 

Perl

$entitydef->GetStateDefNames(); 
識別子
説明
entitydef
スキーマ内のレコード タイプに対応する EntityDef オブジェクト。
戻り値
Visual Basic の場合、エレメントが文字列の配列を含む Variant。各文字列には、1 つの状態名が含まれています。EntityDef オブジェクトに状態がない場合、戻り値は空の Variant です。Perl の場合は、文字列の配列への参照。

VBScript

set sessionObj = GetSession
set entityDefObj = sessionObj.GetEntityDef(GetEntityDefName())

If entityDefObj.GetType = AD_REQ_ENTITY Then
   sessionObj.OutputDebugString "States of record type: " & _
            entityDefObj.GetName() 

   ' List the possible states of the record
   nameList = entityDefObj.GetStateDefNames()
   For Each stateName in nameList
      sessionObj.OutputDebugString stateName
   Next
End If 

Perl

$sessionObj = $entity->GetSession();

$entityDefObj = $sessionObj->GetEntityDef($entity->GetEntityDefName());



if ($entityDefObj->GetType eq $CQPerlExt::CQ_REQ_ENTITY)

 {

 $sessionObj->OutputDebugString("States of record type:
       ".$entityDefObj->GetName());



 # List the possible states of the record

 $nameList = $entityDefObj->GetStateDefNames();



foreach $stateName (@$nameList)
   {
  $sessionObj->OutputDebugString($stateName)

  }

 } 

フィードバック