GetEnabledEntityDefs

Description

Returns the EntityDefs collection object enabled in the current schema for a given package revision.

Use with GetEnabledPackageRevs to discover which packages and package revisions apply to the current user database. If you pass a package name and a null revision, this method returns the EntityDefs that have the named package installed regardless of revision (as if the revision were a wildcard.)

Syntax

Perl


$session->GetEnabledEntityDefs(packageName, revString); 
Identifier
Description
session
The Session object that represents the current database-access session.
packageName
A String containing a Package name.
revString
A String containing the revision string of the PackageRev.
Return value
The EntityDefs object for the current package revision.

Example

Perl


use CQPerlExt;

#Start a DevOps
Plan session

$Session = CQSession::Build();

$Session->UserLogon("admin","","SAMPL","");



$packages = $Session->GetEnabledPackageRevs();

for($x=0;$x<$packages->Count();$x++){

  $pack = $packages->Item($x);

  $a = $pack->GetPackageName();

  $b = $pack->GetRevString();

  print "$a $b\n";

  $edefs = $Session->GetEnabledEntityDefs($a,$b);



  for($y=0;$y<$edefs->Count();$y++){

    $edef = $edefs->Item($y);

    $name = $edef->GetName();

    print "entitydefname:$name\n";

  }

}

CQSession::Unbuild($Session);