GetType

설명

EntityDef의 유형(State-based 또는 Stateless)을 리턴합니다.

EntityDef 오브젝트의 다른 부분처럼, EntityDef 오브젝트의 유형은 관리자가 Rational® ClearQuest® Designer를 사용하여 설정한 유형을 가진 해당 레코드 유형에 의해 결정됩니다. 유형은 API에서 직접 설정할 수 없습니다.

구문

VBScript

entitydef.GetType 

Perl

$entitydef->GetType(); 
ID
설명
entitydef
스키마의 레코드 유형에 해당하는 EntityDef 오브젝트입니다.
Return value
값이 State-based EntityDef 오브젝트의 경우 EntityType 상수: REQ_ENTITY 또는 Stateless EntityDef 오브젝트의 경우 AUX_ENTITY인 Long을 리턴합니다.

예제

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);

  }

 } 

피드백