by Fargs >> Thu, 10 Jun 2004 0:41:03 GMT
Hi
I was wondering if there is anyway to use a method in a condition. Here's my problem, I have a company with a collection of people, each person can play different roles in the company, such as customer, or employee, or manager, etc. So, i have a person object that has a collection of role objects. But the company needs to find all the customers so wrote a method in the RoleByDescripDict class called includesType that returns a boolean:
includesType(class : Class) : Boolean;
Here's my condition in the person class:
isCustomer():Boolean condition;
begin
return allRoles.includesType(Customer);
end;
Or if there is some type of support for an SQL type language, that would help. Thanks for your help and suggestions.