attractctor
or an initialization expression attrinitexpr
.COOBOL@1.1:AttrQueryListDefGet
and default set action AttrQueryListDefSet
has to be used.QLPERR_INEFFICIENTQUERY
.AttributeQueryListDef<MyClass>[] myquerylist nocopy {
allow {
MyClass
}
attrtreenoautoopen = true;
get = AttrQueryListDefGet;
set = AttrQueryListDefSet;
getver = AttrGetVersionFromActVersion;
restver = AttrRestVersionFromActVersion;
init = expression {
MyClass[] @result = null;
try {
searchresult @sr = FROM MyClass c WHERE c.objcreatedby = coouser;
@result = @sr.GetObjects(10000);
}
catch (@ex) {
//
// Skip errors on object creation because the object would not be created if the initialization expression fails.
//
if (!cootx.IsCreated(cooobj)) { throw @ex; }
}
@result;
}
}
Class Hierarchy
Object > ComponentObject > AttributeDefinition > AttributeObjectDef > AttributeQBOLDef > AttributeQueryListDef