GetEntityDefNames

Description

Returns an array containing the names of the record types in the current database's schema.

This method returns the names of all state-based and stateless record types.

After using this method to get the list of names, you can retrieve the EntityDef Object for a given record type by calling the GetEntityDef method.

Syntaxe

VBScript

session.GetEntityDefNames 

Perl

$session->GetEntityDefNames(); 
Identificateur
Description
session
Objet Session représentant la session en cours d'accès à la base de données.
Valeur renvoyée
For Visual Basic, a Variant containing an array of strings is returned. Each string in the array contains the name of a single EntityDef in the schema.For Perl, a reference to an array of strings is returned.

Exemples

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