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
VBScript
session.GetEnabledEntityDefs
(packageName, revString)
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.
Examples
VBScript
Set sessionObj = CreateObject("CLEARQUEST.SESSION")
sessionObj.UserLogon "admin", "", "SAMPL", AD_PRIVATE_SESSION, ""
Set packages = sessionObj.GetEnabledPackageRevs
For each pack in packages
a = pack.PackageName()
b = pack.RevString()
MsgBox (a)
MsgBox (b)
Set edefs = sessionObj.GetEnabledEntityDefs(a, b)
For each edef in edefs
edefName = edef.GetName()
MsgBox (edefName)
Next
Next
Perl
use CQPerlExt;
#Start a Compass 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);