GetEntityDefNames

Description

Restituisce un vettore che contiene i nomi dei tipi di record nello schema del database corrente.

Questo metodo restituisce i nomi di tutti i tipi di record senza stato e basati sullo stato.

Una volta utilizzato questo metodo per ottenere l'elenco di nomi, รจ possibile richiamare l'Oggetto EntityDef per un determinato tipo di record richiamando il metodo GetEntityDef.

Sintassi

VBScript

session.GetEntityDefNames 

Perl

$session->GetEntityDefNames(); 
Identificativo
Description
session
L'oggetto Session che rappresenta la sessione di accesso al database corrente.
Valore di ritorno
Per Visual Basic, viene restituito un valore Variant che contiene un vettore di stringhe. Ciascuna stringa nel vettore contiene il nome di un singolo EntityDef nello schema. Per Perl, viene restituito un riferimento a un vettore di stringhe.

Esempi

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 

      } 


Feedback