GetEntityDefNames

Descrizione

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

Questo metodo restituisce i nomi di tutti i tipi di record stateless 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
Descrizione
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 array di stringhe. Ciascuna stringa nell'array contiene il nome di un singolo EntityDef nello schema. Per Perl, viene restituito un riferimento a un array 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