GetType

Descripción

Devuelve el tipo (basado en estado o sin estado) de EntityDef.

Como los demás componentes de un objeto EntityDef, el tipo de un objeto EntityDef está determinado por el tipo de registro correspondiente, cuyo tipo establece el administrador utilizando Rational ClearQuest Designer. El tipo no se puede establecer directamente desde la API.

Sintaxis

VBScript

entitydef.GetType 

Perl

$entitydef->GetType(); 
Identificador
Descripción
entitydef
Un objeto EntityDef que corresponde a un tipo de registro de un esquema.
Valor de retorno
Un Long cuyo valor es una de las constantes de EntityType: REQ_ENTITY para un objeto EntityDef basado en estado, o bien, AUX_ENTITY para un objeto EntityDef sin estado.

Ejemplos

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

  }

 } 

Feedback